1 # Maintainer: Enrico Carlesso <enrico (at) ecarlesso (dot) org>
2 pkgname=brother-mfc440cn-cupswrapper
6 pkgdesc="LPR-to-CUPS wrapper for Brother MFC-440CN multifunction network printer"
8 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
10 optdepends=('cups: useless otherwise' 'brother-mfc440cn-lpr>=1.0.1_1: needed to print')
11 makedepends=('binutils')
12 provides=("$pkgname=${pkgver%_*}")
13 conflicts=("$pkgname")
15 install="$pkgname.install"
16 source=("http://www.brother.com/pub/bsc/linux/dlf/${_printer}cupswrapper-1.0.1-1.i386.deb")
17 md5sums=('7a2a9172d441dd19032d4c20209e7ccb')
22 ar x ${_printer}cupswrapper-${pkgver/_/-}.i386.deb || return 1
24 tar -xzvf data.tar.gz -C data || return 1
25 # Fix the directory structure. Moves /usr/local/Brother to /usr/share/brother and fix links
26 mkdir -p data/usr/share
27 mv data/usr/local/Brother data/usr/share/brother
29 sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
30 sed -i 's|/etc/init.d|/etc/rc.d|' "data/usr/share/brother/Printer/${_printer}/cupswrapper/cupswrapper${_printer}" || return 1
32 cp -r data/usr $pkgdir || return 1