1 # Contributor: Liming Wang <lmwang+aur@gmail.com>
2 # Contributor: Loui Chang <louipc dot. ist at@ noSPAM gmail.com>
3 # Contributor: Jaroslaw Rosiek <jaroslaw.rosiek@interia.pl>
5 pkgname=brother-hl2170w
9 pkgdesc="Brother HL-2170W CUPS printer driver"
10 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#HL-2170W"
11 license=('custom:Brother' 'GPL')
12 makedepends=('rpmextract')
13 install="brother-hl2170w.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')
26 http://www.brother.com/pub/bsc/linux/dlf/brhl2170wlpr-$pkgver-$_pkgrel.i386.rpm
27 http://www.brother.com/pub/bsc/linux/dlf/cupswrapperHL2170W-$pkgver-$_pkgrel.i386.rpm
30 md5sums=('eb0fb0c952d0594be471c66c4c12ff0e'
31 '2d7fe5114239b48dad38e08e24c9fca0'
32 '5d2b95b7c148eabf21866604e6e5cf3a')
36 cd "$srcdir" || return 1
38 rpmextract.sh "$n" || return 1
41 cd "$srcdir/usr/" || return 1
42 patch -p1 < ../brother-hl2170w.patch
44 mkdir -p "$pkgdir/usr/share"
45 cp -R "$srcdir/usr/bin" "$pkgdir/usr"
46 cp -R "$srcdir/usr/lib" "$pkgdir/usr"
47 cp -R "$srcdir/usr/local/Brother" "$pkgdir/usr/share/Brother"
50 find $pkgdir -type f -exec sed -i s#/usr/local/Brother#/usr/share/Brother#g {} \;
52 cd "$srcdir" || return 1
53 DESTDIR=$pkgdir DRIVER_PREFIX=/usr/share/Brother \
54 "$srcdir/usr/local/Brother/cupswrapper/cupswrapperHL2170W-2.0.2" -s
56 rm "$pkgdir/usr/share/Brother/cupswrapper/cupswrapperHL2170W-2.0.2"
57 rm "$pkgdir/usr/share/Brother/inf/setupPrintcap"