1 # Contributor: Adam Hani Schakaki (krzd) <krzd@krzd.net>
2 pkgname=brother-mfc5490cn-cupswrapper
6 pkgdesc="LPR-to-CUPS wrapper for Brother MFC-5490CN multifunction network printer"
8 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
10 optdepends=('cups: useless otherwise' 'brother-mfc5490cn-lpr>=1.1.2_2: 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-${pkgver/_/-}.i386.deb")
17 md5sums=('285c81c3e86fd1217f53cc908c0d8bcf')
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