1 # Contributor: Olaf Leidinger <leidola@newcon.de>
2 # Contributor: Hervé Cauwelier <herve ¤ oursours.net>
6 pkgdesc="SANE drivers from Brother for model-2 scanners"
9 if [ "$CARCH" == "i686" ]; then
10 _filename="$pkgname-$pkgver-1.i386.deb"
11 md5sums=('0d9f091790f301f5cda0d70382b1fe5a')
13 _filename="$pkgname-$pkgver-1.amd64.deb"
14 md5sums=('a64754f444fb5e949c624dabb1b91be8')
16 source="http://www.brother.com/pub/bsc/linux/dlf/$_filename"
17 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
18 license=("GPL" 'custom:brother commercial license')
19 install=("${pkgname}.install")
22 mkdir -p $startdir/src || return 1
23 cd $startdir/src || return 1
24 ar -x ../$_filename || return 1
25 mkdir -p $startdir/pkg || return 1
26 cd $startdir/pkg || return 1
27 tar -xzf ../src/data.tar.gz || return 1
29 # On x86_64, install in "/usr/lib" instead of "/usr/lib64"
30 if [ "$CARCH" == "x86_64" ]; then
32 mv lib64 lib || return 1
33 # some links are wrong now - recreate them
34 for fn in lib/libbrcolm2.so.1.0.1 \
35 lib/libbrscandec2.so.1.0.0 \
36 lib/sane/libsane-brother2.so.1.0.7
38 # break, if file does not exist
39 if [ ! -f $fn ] ; then
40 echo "ERROR: $fn does not exist"
43 base=`echo $fn | cut -d. -f1`.so
44 major=`echo $fn | cut -d. -f3`
45 ln -sf `basename $fn` $base || return 1
46 ln -sf `basename $fn` $base.$major || return 1