updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / brother-mfc795cw-cupswrapper / PKGBUILD
blob83050635037f0091a9af8d3e28b20aeaf880b581
1 # Contributor: Suminus <suminus(at)riseup.net>
3 _printer=mfc795cw
4 pkgname=brother-${_printer}-cupswrapper
5 pkgver=1.1.2_2
6 _version="${pkgver//_/-}"
7 pkgrel=2
8 pkgdesc="LPR-to-CUPS wrapper for Brother MFC-795CW multifunction network printer"
9 arch=('i686' 'x86_64')
10 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-795CW"
11 license=('GPL')
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')
17 build() {
18   cd $srcdir
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
26   rm -r data/usr/local
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