updated on Sat Jan 21 20:03:50 UTC 2012
[aur-mirror.git] / brother-hl2030 / PKGBUILD
blob9a906354a99f7d435727021e71b59b8751fad9ba
1 # Contributor: Jaroslaw Rosiek <jaroslaw.rosiek@interia.pl>
2 pkgname="brother-hl2030"
3 pkgver="2.0.1"
4 pkgrel="5"
5 pkgdesc="Brother HL-2030 CUPS driver"
6 url="http://www.brother.com"
7 license=('custom:Brother Industries')
8 makedepends=('rpmextract')
9 install="brother-hl2030.install"
10 arch=('i686' 'x86_64')
11 depends=('a2ps')
13 if [[ -z "$CARCH" ]]; then
14   echo ":: PKGBUILD could not detect your architecture. Some dependencies may be missing"
15 else
16   if [[ "$CARCH" == "x86_64" ]]; then
17     depends=("${depends[@]}" 'lib32-glibc')
18   fi
21 source=(
22   brother-hl2030.patch \
23   http://pub.brother.com/pub/com/bsc/linux/dlf/cupswrapperHL2030-2.0.1-1.i386.rpm
24   http://pub.brother.com/pub/com/bsc/linux/dlf/brhl2030lpr-2.0.1-1.i386.rpm
27 build()
29   cd "$startdir/src" || return 1
30   for n in *.rpm; do
31     rpmextract.sh "$n" || return 1
32   done 
34   cd "$startdir/src/usr/" || return 1
35   patch -p1 < ../brother-hl2030.patch
36   
37   cd "$startdir/src" || return 1
38   "$startdir/src/usr/local/Brother/cupswrapper/cupswrapperHL2030-2.0.1"
40   mkdir -p "$startdir/pkg/usr/share"
41   cp -R "$startdir/src/usr/bin" "$startdir/pkg/usr"
42   cp -R "$startdir/src/usr/lib" "$startdir/pkg/usr"
43   cp -R "$startdir/src/usr/local/Brother" "$startdir/pkg/usr/share/brother"
45   rm "$startdir/pkg/usr/share/brother/cupswrapper/cupswrapperHL2030-2.0.1"
46   rm "$startdir/pkg/usr/share/brother/inf/setupPrintcap"
48   install -m 644 -D ppd_file "$startdir/pkg/usr/share/cups/model/HL2030.ppd"
49   install -m 755 -D wrapper "$startdir/pkg/usr/lib/cups/filter/brlpdwrapperHL2030"
50   
51 #  return 1
55 md5sums=('e81a2b369368fb8fa56a08c3341097b2'
56          '29e4d9dfd44ee8fc1629b9cfdadfb896'
57          '29d20e3925e29779260dbbcd0d1fc29e')