1 # Contributor: kimotori <kimotori@gmail.com>
2 # Contributor: Hervé Cauwelier <herve ¤ oursours.net>
8 pkgdesc="SANE drivers from Brother for USB scanners"
11 if [ "$CARCH" == "i686" ]; then
12 _filename="$pkgname-$pkgver-0.i386.deb"
13 md5sums=('a89873d5306282fcf8dafe426ba9df33')
15 _filename="$pkgname-$pkgver-0.amd64.deb"
16 md5sums=('b3aa41e55ea17600eca87ab0f761e9b0')
18 source="http://www.brother.com/pub/bsc/linux/dlf/$_filename"
19 url="http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/index.html"
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/libbrcolm.so.1.0.1 \
35 lib/libbrscandec.so.1.0.0 \
36 lib/sane/libsane-brother.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