1 # Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
2 pkgname=brother-mfc260c-lpr
6 pkgdesc="Brother LPR driver for MFC-260C printer"
8 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-260C"
9 license=('custom:Brother_Software_Open_License_Agreement')
11 optdepends=("brother-$_printer-cupswrapper: For printing via CUPS.")
12 provides=("brother-$_printer=${pkgver%_*}")
13 conflicts=("brother-$_printer")
14 backup=("usr/share/brother/printer/$_printer/inf/br${_printer}rc")
15 install=$pkgname.install
16 source=(http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_debian/${_printer}lpr-${pkgver//_/-}.i386.deb
17 license.txt $pkgname.patch)
18 md5sums=('fbcea862b62b95cabbdd4f4ac31015c5'
19 'c420ebb7d3431fec700a855ff0aa266b'
20 '78f2a0a34fe9e9ab47ea79dbaf19d769')
23 # extract the deb archive
25 ar x ${_printer}lpr-${pkgver//_/-}.i386.deb || return 1
27 tar -xvzf data.tar.gz -C data || return 1
28 patch -Np0 < $pkgname.patch || return 1
30 install -d -m755 $pkgdir/usr/{bin,share/brother/printer} || return 1
32 # install the config tool
33 install -m755 data/usr/bin/brprintconf_$_printer $pkgdir/usr/bin/ || return 1
34 sed -e 's|usr/local/Brother/Printer|usr/share/brother/printer|g' -i $pkgdir/usr/bin/brprintconf_$_printer || return 1
37 cp -R data/usr/local/Brother/Printer/$_printer $pkgdir/usr/share/brother/printer/ || return 1
38 rm $pkgdir/usr/share/brother/printer/$_printer/inf/setupPrintcapij
40 # make config file editable by members of the "lp" group
41 cd $pkgdir/usr/share/brother/printer/$_printer/inf
42 chown :lp br${_printer}rc || return 1
43 chmod 664 br${_printer}rc || return 1
44 # chown :lp . || return 1
45 # chmod 775 . || return 1
49 install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1