updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / brother-hl3040cn-lpr / PKGBUILD
blob3881b674fc636f16dadc15949e0430b0b61f99b3
1 # Maintainer: Christopher Hall <followingthepath (at) gmail (dot) com>
2 pkgname=brother-hl3040cn-lpr
3 _printer=hl3040cn
4 pkgver=1.1.1_4
5 pkgrel=1
6 pkgdesc="LPR driver for Brother HL-3040CN 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 md5sums=('0d87c120cf0c451730653b7a29df2c4a')
19 build() {
20   cd $srcdir
21   ar x ${_printer}lpr-${pkgver/_/-}.i386.deb || return 1
22   mkdir data
23   tar -xzvf data.tar.gz -C data || return 1
24   # Fix directory structure. Moves /usr/local/Brother to /usr/share/brother and fix links
25   mv data/usr/local/Brother data/usr/local/brother
26   mv data/usr/local data/usr/share
27   sed -i 's|/usr/local/Brother|/usr/share/brother|g' $(grep -lr '/usr/local/Brother' data/) || return 1
28   cp -r data/usr $pkgdir || return 1