updated on Sun Jan 15 08:01:04 UTC 2012
[aur-mirror.git] / brother-mfc9970cdw-cupswrapper / PKGBUILD
blobcee26d43c2034f2c4217056ae3c1a8db981ff05a
1 # Contributor: Based on mfc9840 package by Gero Mueller <gero.mueller (at) cloo (dot) de>. Modified for mfc9970 by Bregol
2 pkgname=brother-mfc9970cdw-cupswrapper
3 _printer=mfc9970cdw  # note: Should be changed to lowercase if used.
4                    #       Currently uppercase to match .deb filename
5 pkgver=1.1.1_5
6 pkgrel=1
7 pkgdesc="LPR-to-CUPS wrapper for Brother MFC-9970CDW multifunction network printer"
8 arch=('i686' 'x86_64')
9 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-9970CDW"
10 license=('custom:Brother_Software_Open_License_Agreement')
11 depends=('cups' 'ghostscript' 'brother-mfc9970cdw-lpr>=1.1.1_5')
12 makedepends=('binutils')
13 provides=("$pkgname=${pkgver%_*}")
14 conflicts=("$pkgname")
15 replaces=("$pkgname")
16 source=("http://www.brother.com/pub/bsc/linux/dlf/${_printer}cupswrapper-${pkgver/_/-}.i386.deb"
17         'license.txt')
18 md5sums=('d7055ee37d152fa1aa98a2518694d159'
19         'e6c88b61e90bc1535269f402a01d5321')
20 build() {
21   cd $srcdir
23   # extract the archive
24   ar x ${_printer}cupswrapper-${pkgver//_/-}.i386.deb || return 1
25   mkdir data
26   tar -xzvf data.tar.gz -C data || return 1
28   # correct the directory structure
29   mkdir -p data/usr/share
30   mv data/usr/local/Brother data/usr/share/brother
31   rm -r data/usr/local
32   sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
33   sed -i 's|/etc/init.d|/etc/rc.d|' "data/usr/share/brother/Printer/${_printer}/cupswrapper/cupswrapper${_printer}" || return 1
35   # copy into place
36   cp -r data/usr $pkgdir || return 1
38   # install the license
39   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1
42 # vim:set ts=2 sw=2 et: