1 # Contributor: Wael Nasreddine <wael.nasreddine@sabayonlinux.org>
3 pkgname=brother-hl2150n
6 pkgdesc="Brother HL-2150n CUPS printer driver"
7 url="http://solutions.brother.com/linux/en_us/download_prn.html#HL-2150n"
8 license=('custom:Brother' 'GPL')
9 makedepends=('rpmextract')
10 install="${pkgname}.install"
11 arch=('i686' 'x86_64')
13 if [[ -z "$CARCH" ]]; then
14 echo ":: PKGBUILD could not detect your architecture. Some dependencies may be missing."
16 if [[ "$CARCH" == "x86_64" ]]; then
17 depends=('lib32-glibc')
23 http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperHL2150N-${pkgver}-1.i386.rpm
24 http://pub.brother.com/pub/com/bsc/linux/dlf/brhl2150nlpr-${pkgver}-1.i386.rpm
27 md5sums=('317e7833c15c3f8ca543b90ac6237494'
28 'e8be54c3226c61852957f19f6db2c279'
29 '26a354fad4423e2a90f1063de51ac563')
33 cd "$srcdir" || return 1
35 rpmextract.sh "$n" || return 1
38 cd "$srcdir/usr/" || return 1
39 patch -p1 < ../${pkgname}.patch
41 mkdir -p "$pkgdir/usr/share"
42 cp -R "$srcdir/usr/bin" "$pkgdir/usr"
43 cp -R "$srcdir/usr/lib" "$pkgdir/usr"
44 cp -R "$srcdir/usr/local/Brother" "$pkgdir/usr/share/Brother"
47 find $pkgdir -type f -exec sed -i s#/usr/local/Brother#/usr/share/Brother#g {} \;
49 cd "$srcdir" || return 1
50 DESTDIR=$pkgdir DRIVER_PREFIX=/usr/share/Brother \
51 "$srcdir/usr/local/Brother/cupswrapper/cupswrapperHL2150N-${pkgver}" -s
53 rm "$pkgdir/usr/share/Brother/cupswrapper/cupswrapperHL2150N-${pkgver}"
54 rm "$pkgdir/usr/share/Brother/inf/setupPrintcap"