summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 639825f3205485c0d19fcac1018513b3cbb93143 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Maintainer: Tyler Erickson  <me@tylererickson.com>
# Based on brother-mfc-j6510dw package from AUR

_model="9560cdw"
pkgname="brother-mfc-$_model"
pkgver="1.1.1"
pkgrel=3
pkgdesc="LPR and CUPS driver for the Brother MFC-9560CDW"
arch=('i686' 'x86_64')
url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
license=('unknown')
depends=('tcsh' 'deb2targz' 'perl' 'a2ps')
if test "$CARCH" == x86_64; then
   depends+=(lib32-glibc)
fi
install="brother-mfc-${_model}.install"
_revision=5

source=("http://www.brother.com/pub/bsc/linux/dlf/mfc${_model}lpr-${pkgver}-${_revision}.i386.deb"
   "http://www.brother.com/pub/bsc/linux/dlf/mfc${_model}cupswrapper-${pkgver}-${_revision}.i386.deb")
md5sums=('dca5a82a1b9f0c446d6b91351f681ded'
         '22ebdb31222d8e3bde28690fb2b73af3')


build() {
    deb2targz *.deb >/dev/null || return 1
    rm -f *.deb || return 1
    cd $srcdir || return 1
    [ -d "mfc${_model}" ] || (mkdir mfc${_model} || return 1)
    for i in *.tar.gz;do tar xfz $i -C mfc${_model};done || return 1
    cd mfc${_model} || return 1
    cd usr/local/Brother/Printer/mfc${_model} || return 1
    perl -i -pe 's#/etc/init.d#/etc/rc.d#g' ./cupswrapper/cupswrappermfc${_model} || return 1
    perl -i -pe 's#printcap\.local#printcap#g' $srcdir/mfc${_model}/usr/local/Brother/Printer/mfc${_model}/inf/setupPrintcapij || return 1
}

package() {
    cp -rf $srcdir/mfc${_model}/usr/ $pkgdir/ || return 1
}