updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / brother-mfc440cn-lpr / PKGBUILD
blob8568e35e4d4a98c835eb9230785b1744fe5a49e5
1 # Maintainer: Enrico Carlesso <enrico (at) ecarlesso (dot) org>
2 pkgname=brother-mfc440cn-lpr
3 _printer=mfc440cn
4 pkgver=1.0.1_1
5 pkgrel=2
6 pkgdesc="LPR driver for Brother MFC-440CN multifunction network printer"
7 arch=('i686' 'x86_64')
8 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
9 license=('custom:Brother_Software_Open_License_Agreement')
10 depends=('sh')
11 makedepends=('binutils')
12 optdepends=("brother-$_printer-cupswrapper: For printing via CUPS.")
13 provides=("$pkgname=${pkgver%_*}")
14 conflicts=("$pkgname")
15 replaces=("$pkgname")
16 source=("http://www.brother.com/pub/bsc/linux/dlf/${_printer}lpr-1.0.1-1.i386.deb"
17         'license.txt')
18 md5sums=('2b4c3f6c130ea5b788baa550dc663687'
19          'aa36745fb35ddff6343bed3ae8dae5eb')
21 build() {
22   cd $srcdir
23   ar x ${_printer}lpr-${pkgver/_/-}.i386.deb || return 1
24   mkdir data
25   tar -xzvf data.tar.gz -C data || return 1
26   # Fix directory structure. Moves /usr/local/Brother to /usr/share/brother and fix links
27   mv data/usr/local/Brother data/usr/local/brother
28   mv data/usr/local data/usr/share
29   sed -i 's|/usr/local/Brother|/usr/share/brother|g' $(grep -lr '/usr/local/Brother' data/) || return 1
30   cp -r data/usr $pkgdir || return 1
31   # install the license
32   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1