updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / brother-mfc260c-lpr / PKGBUILD
blob7bfccf1c8920ef31d0083cf03ad021b22ff8f9a1
1 # Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
2 pkgname=brother-mfc260c-lpr
3 _printer=mfc260c
4 pkgver=1.0.1_1
5 pkgrel=2
6 pkgdesc="Brother LPR driver for MFC-260C printer"
7 arch=('i686')
8 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-260C"
9 license=('custom:Brother_Software_Open_License_Agreement')
10 depends=('a2ps')
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')
22 build() {
23   # extract the deb archive
24   cd $srcdir
25   ar x ${_printer}lpr-${pkgver//_/-}.i386.deb || return 1
26   mkdir data
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
36   # copy the rest
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
46   cd $srcdir
48   # install the license
49   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1