1 # Contributor: Suminus <suminus(at)riseup.net>
4 pkgname=brother-${_printer}-cupswrapper
6 _version="${pkgver//_/-}"
8 pkgdesc="LPR-to-CUPS wrapper for Brother MFC-795CW multifunction network printer"
10 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-795CW"
12 depends=('cups' 'ghostscript' "brother-${_printer}-lpr>=1.1.2_1-1")
13 install="$pkgname.install"
14 source=("http://www.brother.com/pub/bsc/linux/dlf/mfc795cwcupswrapper-1.1.2-2.i386.deb")
15 md5sums=('22371a40d661afcb80d00297620d9e41')
20 ar x ${_printer}cupswrapper-${_version}.i386.deb || return 1
21 [ ! -d "data" ] && mkdir data
22 tar -xzvf data.tar.gz -C data || return 1
24 [ ! -d "data/usr/share" ] && mkdir data/usr/share
25 mv data/usr/local/Brother data/usr/share/brother
27 sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
28 sed -i 's|/etc/init.d|/etc/rc.d|' `grep -lr '/etc/init.d' data/` || return 1
30 cp -r data/usr $pkgdir || return 1