wok view brscan/receipt @ rev 9075

Up: gavl to 1.2.0.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Mar 04 10:28:26 2011 +0000 (2011-03-04)
parents 4273e906522b
children 2e29b2259f48
line source
1 # SliTaz package receipt.
3 PACKAGE="brscan"
4 VERSION="0.2.4"
5 CATEGORY="office"
6 SHORT_DESC="Brother Scanner driver for SANE."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 SOURCE="$PACKAGE-src"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 WEB_SITE="http://solutions.brother.com/linux/sol/printer/linux/sane_drivers.html"
11 WGET_URL="http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/sane_source/$TARBALL"
12 DEPENDS="sane-backends"
13 TAGS="scanner driver"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 cd $src/brscan
19 ./configure --prefix=/usr --infodir=/usr/share/info \
20 --sysconfdir=/etc --localstatedir=/var \
21 --mandir=/usr/share/man \
22 $CONFIGURE_ARGS || return 1
23 sed -i '/mk_package/d' Makefile
24 make && {
25 cd ..
26 mkdir -p $DESTDIR
27 cp -a brscan $DESTDIR
28 }
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/bin $fs/usr/lib/sane
35 for i in BHL BHL2 BHL2FB BHLFB BHMFB BHminiFB YL4 YL4FB \
36 ZL2 ZL2FB ZLe ZLeFB ; do
37 mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
38 cp -a $_pkg/brscan/libbrcolm/GrayCmData/$i/* \
39 $fs/usr/local/Brother/sane/GrayCmData/$i
40 chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i/*
41 done
42 cp $_pkg/brscan/backend_brscan/.libs/libsane-brother.so.1.0.7 \
43 $fs/usr/lib/sane/libsane-brother.so.1.0.7
44 ln -s libsane-brother.so.1.0.7 $fs/usr/lib/sane/libsane-brother.so.1
45 ln -s libsane-brother.so.1 $fs/usr/lib/sane/libsane-brother.so
46 cp $_pkg/brscan/libbrscandec/libbrscandec.so.1.0.0 \
47 $fs/usr/lib/libbrscandec.so.1.0.0
48 chmod 755 $fs/usr/lib/libbrscandec.so.1.0.0
49 ln -s libbrscandec.so.1.0.0 $fs/usr/lib/libbrscandec.so.1
50 ln -s libbrscandec.so.1 $fs/usr/lib/libbrscandec.so
51 cp $_pkg/brscan/libbrcolm/libbrcolm.so.1.0.0 \
52 $fs/usr/lib/libbrcolm.so.1.0.0
53 ln -s libbrcolm.so.1.0.0 $fs/usr/lib/libbrcolm.so.1
54 ln -s libbrcolm.so.1 $fs/usr/lib/libbrcolm.so
55 cp $_pkg/brscan/mk_package/Brsane.ini \
56 $fs/usr/local/Brother/sane/Brsane.ini
57 cp $_pkg/brscan/mk_package/brsanenetdevice.cfg \
58 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
59 chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
60 cp $_pkg/brscan/netconfig/brsaneconfig \
61 $fs/usr/local/Brother/sane/brsaneconfig
62 ln -s /usr/local/Brother/sane/brsaneconfig $fs/usr/bin/brsaneconfig
63 cp $_pkg/brscan/mk_package/setupSaneScan \
64 $fs/usr/local/Brother/sane/setupSaneScan
65 chmod 755 $fs/usr/local/Brother/sane/setupSaneScan
66 }
68 # Pre and post install and remove commands for Tazpkg.
69 post_install()
70 {
71 chroot $1/ /usr/local/Brother/sane/setupSaneScan -i
72 }
74 pre_remove()
75 {
76 chroot $1/ /usr/local/Brother/sane/setupSaneScan -e
77 }