updated on Thu Jan 19 12:17:07 UTC 2012
[aur-mirror.git] / brother-fax1940cn-lpr / PKGBUILD
blobaa815fc5a3badc7a9bc8fbb4a68df9e5594ce786
1 # Contributor: Markus Golser <elmargol@googlemail.com>
2 pkgname=brother-fax1940cn-lpr
3 _printer=fax1940cn
4 pkgver=1.0.2_1
5 pkgrel=2
6 pkgdesc="Brother LPR driver for FAX 1940CNC printer"
7 arch=('i686')
8 url="http://solutions.brother.com/linux/en_us/download_prn.html#FAX-1940CN"
9 license=('custom:Brother_Software_Open_License_Agreement')
10 depends=('a2ps' 'gcc-libs')
11 optdepends=("brother-$_printer-cupswrapper: For printing via CUPS.")
12 provides=("brother-$_printer=${pkgver%_*}")
13 conflicts=("brother-$_printer")
14 install=$pkgname.install
15 source=(http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_debian/${_printer}lpr-${pkgver//_/-}.i386.deb
16         $pkgname.patch license.txt)
17 md5sums=('007c5cfbad2c167c730ec75117a31f36'
18          'c81a66db97f18874a923037f74ce4aa8')
20 build() {
21   # extract the deb archive
22   cd $srcdir
23   ar x ${_printer}lpr-${pkgver//_/-}.i386.deb || return 1
24   mkdir data
25   tar -xvzf data.tar.gz -C data || return 1
26   patch -Np1 -d data < $pkgname.patch || return 1
28   install -d -m755 $pkgdir/usr/{local,bin,lib/brother/printer} || return 1
29   # install the config tool
30   install -m755 $srcdir/data/usr/bin/brprintconfij2 $pkgdir/usr/bin/ || return 1
32   # copy the rest
33   cp -R $srcdir/data/usr/local/Brother/ $pkgdir/usr/Brother || return 1
34   cp -R $srcdir/data/usr/lib/ $pkgdir/usr/ || return 1
35   ln -s /usr/Brother $pkgdir/usr/local/Brother || return 1
37   # install the license
38   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1