updated on Mon Jan 23 04:00:55 UTC 2012
[aur-mirror.git] / brother-mfc9840cdw-cupswrapper / PKGBUILD
blob7dad4cdb828f50d7b317c7dc3c36ef7379a2bc99
1 # Contributor:Gero Mueller <gero.mueller (at) cloo (dot) de>
2 pkgname=brother-mfc9840cdw-cupswrapper
3 _printer=mfc9840cdw  # note: Should be changed to lowercase if used.
4                    #       Currently uppercase to match .deb filename
5 pkgver=1.0.2_4
6 pkgrel=1
7 pkgdesc="LPR-to-CUPS wrapper for Brother MFC-9840CDW multifunction network printer"
8 arch=('i686' 'x86_64')
9 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-9840CDW"
10 license=('custom:Brother_Software_Open_License_Agreement')
11 depends=('cups' 'ghostscript' 'brother-mfc9840cdw-lpr>=1.0.2_4')
12 makedepends=('binutils')
13 provides=("$pkgname=${pkgver%_*}")
14 conflicts=("$pkgname")
15 replaces=("$pkgname")
16 install="$pkgname.install"
17 source=('http://solutions.brother.com/Library/sol/printer/linux/dlf/mfc9840cdwcupswrapper-1.0.2-4.i386.deb'
18         'license.txt')
19 build() {
20   cd $srcdir
22   # extract the archive
23   ar x mfc9840cdwcupswrapper-1.0.2-4.i386.deb || return 1
24   mkdir data
25   tar -xzvf data.tar.gz -C data || return 1
27   # correct the directory structure
28   mv data/usr/local/Brother data/usr/share/brother
29   rm -r data/usr/local
30   sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
31   sed -i 's|/etc/init.d|/etc/rc.d|' "data/usr/share/brother/Printer/mfc9840cdw/cupswrapper/cupswrapperSetup_mfc9840cdw" || return 1
33   # copy into place
34   cp -r data/usr $pkgdir || return 1
36   # install the license
37   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1
40 # vim:set ts=2 sw=2 et: