updated on Tue Jan 10 12:02:00 UTC 2012
[aur-mirror.git] / brother-mfc5490cn-lpr / PKGBUILD
blob16744aa0b28bc5ba0c01dc228904f37e4d7bc430
1 # Contributor: Adam Hani Schakaki (krzd) <krzd@krzd.net>
2 pkgname=brother-mfc5490cn-lpr
3 _printer=mfc5490cn
4 pkgver=1.1.2_2
5 pkgrel=1
6 pkgdesc="LPR driver for Brother MFC-5490CN 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-${pkgver/_/-}.i386.deb"
17         'license.txt')
18 md5sums=('749880e5ae19dee6aea51457d15f3887'
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