1 #Maintainer: David Campbell <davekong@archlinux.us>
2 #Contributor: Loui Chang <louipc dot ist at noSPAM gmail company>
3 #Contributor: Jaroslaw Rosiek <jaroslaw.rosiek@interia.pl>
8 pkgdesc="Brother HL-2140 CUPS printer driver"
9 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#HL-2140"
10 license=('custom:Brother' 'GPL')
11 depends=('a2ps' 'cups')
12 makedepends=('libarchive')
13 install="brother-hl2140.install"
14 arch=('i686' 'x86_64')
16 if [[ -z "$CARCH" ]]; then
17 echo ":: PKGBUILD could not detect your architecture. Some dependencies may be missing."
19 if [[ "$CARCH" == "x86_64" ]]; then
20 depends+=('lib32-glibc')
24 source=(0001-brother-hl2140.patch
26 http://www.brother.com/pub/bsc/linux/dlf/cupswrapperHL2140-2.0.2-1.i386.rpm
27 http://www.brother.com/pub/bsc/linux/dlf/brhl2140lpr-2.0.2-1.i386.rpm)
28 md5sums=('79056da6a35147e6714937d73d736856'
29 '58796468c65d77c835e5959970b91f36'
30 '931035c9b7a8e7ee667efefba4bba168'
31 '0c4bbdc943c987c101266c832d6c8b7a')
39 patch -p1 < 0001-brother-hl2140.patch
41 install -d "$pkgdir/usr/share"
42 cp -R usr/bin "$pkgdir/usr"
43 cp -R usr/lib "$pkgdir/usr"
44 cp -R usr/local/Brother "$pkgdir/usr/share/Brother"
47 find $pkgdir -type f -exec sed -i s#/usr/local/Brother#/usr/share/Brother#g {} \;
50 DESTDIR=$pkgdir DRIVER_PREFIX=/usr/share/Brother \
51 'usr/local/Brother/cupswrapper/cupswrapperHL2140-2.0.2' -s
53 rm "$pkgdir/usr/share/Brother/cupswrapper/cupswrapperHL2140-2.0.2"
54 rm "$pkgdir/usr/share/Brother/inf/setupPrintcap"
55 # Unset world writable bit.
56 chmod 755 "$pkgdir/usr/share/Brother/inf"
57 chmod 644 "$pkgdir/usr/share/Brother/inf/brHL2140rc"
58 install -Dm644 Brother.license $pkgdir/usr/share/licenses/$pkgname/LICENSE