1 # Maintainer: Christopher Hall <followingthepath (at) gmail (dot) com>
2 pkgname=brother-hl3040cn-lpr
6 pkgdesc="LPR driver for Brother HL-3040CN multifunction network printer"
8 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
9 license=('custom:Brother_Software_Open_License_Agreement')
11 makedepends=('binutils')
12 optdepends=("brother-$_printer-cupswrapper: For printing via CUPS.")
13 provides=("$pkgname=${pkgver%_*}")
14 conflicts=("$pkgname")
16 source=("http://www.brother.com/pub/bsc/linux/dlf/${_printer}lpr-${pkgver/_/-}.i386.deb")
17 md5sums=('0d87c120cf0c451730653b7a29df2c4a')
21 ar x ${_printer}lpr-${pkgver/_/-}.i386.deb || return 1
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