updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / brother-mfc9840cdw-lpr / PKGBUILD~
blobda58d0715f4f57c9d7801f438729bc11d6f34ad7
1 # Contributor: Corey Thompson <cmtptr (at) gmail (dot) com>
2 pkgname=brother-mfc9840cdw-lpr
3 _printer=mfc9840cdw
4 pkgver=1.0.2_4
5 pkgrel=1
6 pkgdesc="LPR driver for Brother MFC-9840CDW multifunction network printer"
7 arch=('i686' 'x86_64')
8 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-9840CDW"
9 license=('custom:Brother_Software_Open_License_Agreement')
10 depends=('tcsh')
11 makedepends=('binutils')
12 optdepends=("brother-$_printer-cupswrapper: For printing via CUPS.")
13 provides=("$pkgname=${pkgver%_*}")
14 conflicts=("$pkgname")
15 replaces=("$pkgname")
16 source=('http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_debian/mfc9840cdwlpr-1.0.2-4.i386.deb'
17         'license.txt')
19 build() {
20   cd $srcdir
22   # extract the archive
23   ar x ${_printer}lpr-${pkgver//_/-}.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/local/brother
29   mv data/usr/local data/usr/share
30   sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
32   # copy into place
33   cp -r data/usr $pkgdir || return 1
35   # install the license
36   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1
39 # vim:set ts=2 sw=2 et: