updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / brother-mfc5440cn-lpr / PKGBUILD
blobb93f9b5b68ee1be896064550ddef1dfeebd33f9e
1 # Contributor: Corey Thompson <cmtptr (at) gmail (dot) com>
2 pkgname=brother-mfc5440cn-lpr
3 _printer=mfc5440cn
4 pkgver=1.0.2_1
5 pkgrel=2
6 pkgdesc="LPR driver for Brother MFC-5440CN multifunction network printer"
7 arch=('i686' 'x86_64')
8 url="http://solutions.brother.com/linux/en_us/download_prn.html#MFC-5440CN"
9 license=('custom:Brother_Software_Open_License_Agreement')
10 depends=('tcsh')
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://solutions.brother.com/Library/sol/printer/linux/rpmfiles/lpr_debian/mfc5440cnlpr-1.0.2-1.i386.deb'
17         'license.txt')
18 md5sums=('373e42fb4fb416e9cd36f787ad62b41d'
19          'e6c88b61e90bc1535269f402a01d5321')
21 build() {
22   cd $srcdir
24   # extract the archive
25   ar x ${_printer}lpr-${pkgver//_/-}.i386.deb || return 1
26   mkdir data
27   tar -xzvf data.tar.gz -C data || return 1
29   # correct the directory structure
30   mv data/usr/local/Brother data/usr/local/brother
31   mv data/usr/local data/usr/share
32   sed -i 's|/usr/local/Brother|/usr/share/brother|g' `grep -lr '/usr/local/Brother' data/` || return 1
34   # copy into place
35   cp -r data/usr $pkgdir || return 1
37   # install the license
38   install -D -m644 license.txt $pkgdir/usr/share/licenses/$pkgname/license.txt || return 1
41 # vim:set ts=2 sw=2 et: