updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / brother-mfc9970cdw-lpr / PKGBUILD
bloba5c6e5e9d3dec5d1e94b8c7c92c38b8652288a3c
1 # Contributor: Based on mfc9840 package by Corey Thompson <cmtptr (at) gmail (dot) com>. Modified for mfc9970 by Bregol
2 pkgname=brother-mfc9970cdw-lpr
3 _printer=mfc9970cdw
4 pkgver=1.1.1_5
5 pkgrel=2
6 pkgdesc="LPR driver for Brother MFC-9970CDW multifunction network printer"
7 arch=('i686' 'x86_64')
8 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-9970CDW"
9 license=('custom:Brother_Software_Open_License_Agreement')
10 depends=('sh' 'a2ps')
11 makedepends=('binutils')
12 optdepends=("brother-$_printer-cupswrapper: For printing via CUPS.")
13 provides=("$pkgname=${pkgver%_*}")
14 conflicts=("$pkgname")
15 replaces=("$pkgname")
16 source=("http://www.brother.com/pub/bsc/linux/dlf/${_printer}lpr-${pkgver/_/-}.i386.deb"
17         'license.txt')
18 md5sums=('9ba8b458aa5d784a18f138c4dbb61576'
19         'e6c88b61e90bc1535269f402a01d5321')
20 build() {
21   cd $srcdir
23   # extract the archive
24   ar x ${_printer}lpr-${pkgver//_/-}.i386.deb || return 1
25   mkdir data
26   tar -xzvf data.tar.gz -C data || return 1
28   # correct the directory structure
29   mv data/usr/local/Brother data/usr/local/brother
30   mv data/usr/local data/usr/share
31   sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
33   # copy into place
34   cp -r data/usr $pkgdir || return 1
36   # install the license
37   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1
40 # vim:set ts=2 sw=2 et: