updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / brother-mfc-8870dw / PKGBUILD
blobab2b8b56cbae226224aa8f09dc09e0bca8f73472
1 # Maintainer: Bart Verhoeven <nepherte at archlinux dot us>
2 pkgname=brother-mfc-8870dw
3 pkgver=2.0.1
4 pkgrel=2
5 pkgdesc="CUPS driver for Brother MFC-8870DW printer"
6 arch=('i686' 'x86_64')
7 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
8 license=('GPL')
9 depends=()
10 if [ "$CARCH" = "x86_64" ]; then
11     depends=('cups' 'ghostscript' 'gsfonts' 'foomatic-filters' 'lib32-glibc')
12 else
13     depends=('cups' 'ghostscript' 'gsfonts' 'foomatic-filters')
15 makedepends=('rpmextract')
16 install=brother-mfc-8870dw.install
17 source=(http://www.brother.com/pub/bsc/linux/dlf/brmfc8870dwlpr-2.0.1-1.i386.rpm
18         http://www.brother.com/pub/bsc/linux/dlf/cupswrapperMFC8870DW-2.0.1-1.i386.rpm
19         brother-mfc-8870dw.patch)
20 md5sums=('a73e6b276c35f1e61f2b8c9d3f2aa981'
21          '038c3cf118ffe82c9eda5e78b80a96b4'
22          '541e17ca4bcc60637f0a4e654c77b986')
24 build() {
25   cd $srcdir
27   # extract files
28   rpmextract.sh brmfc8870dwlpr-2.0.1-1.i386.rpm
29   rpmextract.sh cupswrapperMFC8870DW-2.0.1-1.i386.rpm
31   # patch files to adhere arch packaging standard
32   patch -p0 < $srcdir/brother-mfc-8870dw.patch || return 1
33   
34   # generate ppd and wrapper file
35   $srcdir/usr/local/Brother/cupswrapper/cupswrapperMFC8870DW-2.0.1
37   # put files where they belong
38   mkdir -p $pkgdir/usr/share
39   cp -r $srcdir/usr/bin $pkgdir/usr
40   cp -r $srcdir/usr/lib $pkgdir/usr
41   cp -r $srcdir/usr/local/Brother $pkgdir/usr/share/brother
42   cp -r $srcdir/var $pkgdir/
44   rm $pkgdir/usr/share/brother/cupswrapper/cupswrapperMFC8870DW-2.0.1
45   rm $pkgdir/usr/share/brother/inf/setupPrintcap
47   install -m 644 -D ppd_file "$pkgdir/usr/share/cups/model/MFC8870DW.ppd"
48   install -m 755 -D wrapper  "$pkgdir/usr/lib/cups/filter/brlpdwrapperMFC8870DW"