wok view brscan2/receipt @ rev 20095

slitaz-base-files: don't backup-restore the whole /etc ($CONFIG_FILES variable exist), allow to update /etc/init.d/rc.functions
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Oct 05 23:51:00 2017 +0300 (2017-10-05)
parents eb8067417980
children
line source
1 # SliTaz package receipt.
3 PACKAGE="brscan2"
4 VERSION="0.2.4"
5 CATEGORY="office"
6 SHORT_DESC="Brother Scanner driver for SANE."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WANTED="brscan"
10 WEB_SITE="http://solutions.brother.com/linux/sol/printer/linux/sane_drivers.html"
11 TAGS="scanner driver"
13 DEPENDS="sane-backends"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/usr/bin $fs/usr/lib/sane $fs/usr/local/Brother/sane/models2
19 for i in ALL AL ; do
20 mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
21 cp -a $src/brscan/libbrcolm2/GrayCmData/$i/* \
22 $fs/usr/local/Brother/sane/GrayCmData/$i
23 chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i
24 done
25 cp $src/brscan/backend_brscan2/.libs/libsane-brother2.so.1.0.7 \
26 $fs/usr/lib/sane/libsane-brother2.so.1.0.7
27 ln -s libsane-brother2.so.1.0.7 $fs/usr/lib/sane/libsane-brother2.so.1
28 ln -s libsane-brother2.so.1 $fs/usr/lib/sane/libsane-brother2.so
29 cp $src/brscan/libbrscandec2/libbrscandec2.so.1.0.0 \
30 $fs/usr/lib/libbrscandec2.so.1.0.0
31 chmod 755 $fs/usr/lib/libbrscandec2.so.1.0.0
32 ln -s libbrscandec2.so.1.0.0 $fs/usr/lib/libbrscandec2.so.1
33 ln -s libbrscandec2.so.1 $fs/usr/lib/libbrscandec2.so
34 cp $src/brscan/libbrcolm2/libbrcolm2.so.1.0.0 \
35 $fs/usr/lib/libbrcolm2.so.1.0.0
36 chmod 755 $fs/usr/lib/libbrcolm2.so.1.0.0
37 ln -s libbrcolm2.so.1.0.0 $fs/usr/lib/libbrcolm2.so.1
38 ln -s libbrcolm2.so.1 $fs/usr/lib/libbrcolm2.so
39 while read line; do
40 echo $line
41 echo $line | grep -q 'Support Model' || continue
42 cat <<EOT
43 0x01eb,6,1,"MFC-7320",131,4
44 0x01e7,6,1,"MFC-7340",131,4
45 0x01e6,6,1,"MFC-7440N",131,4
46 0x01ee,6,1,"MFC-7450",131,4
47 0x01ed,6,1,"MFC-7840N",131,4
48 0x01e5,6,1,"MFC-7840W",131,4
49 0x01ea,6,1,"DCP-7030",131,4
50 0x01e9,6,1,"DCP-7040",131,4
51 0x01e8,6,1,"DCP-7045N",131,4
53 EOT
54 done < $src/brscan/mk_package/Brsane2.ini > \
55 $fs/usr/local/Brother/sane/Brsane2.ini
56 chmod 644 $fs/usr/local/Brother/sane/Brsane2.ini
57 cp $src/brscan/mk_package/brsanenetdevice2.cfg \
58 $fs/usr/local/Brother/sane/brsanenetdevice2.cfg
59 chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice2.cfg
60 cp $src/brscan/netconfig/brsaneconfig2 \
61 $fs/usr/local/Brother/sane/brsaneconfig2
62 ln -s /usr/local/Brother/sane/brsaneconfig2 $fs/usr/bin/brsaneconfig2
63 cp $src/brscan/mk_package/setupSaneScan2 \
64 $fs/usr/local/Brother/sane/setupSaneScan2
65 chmod 755 $fs/usr/local/Brother/sane/setupSaneScan2
66 cp $src/brscan/mk_package/ext1.ini \
67 $fs/usr/local/Brother/sane/models2/ext1.ini
68 }
70 # Pre and post install and remove commands for Tazpkg.
71 post_install()
72 {
73 chroot "$1/" /usr/local/Brother/sane/setupSaneScan2 -i
74 }
76 pre_remove()
77 {
78 chroot "$1/" /usr/local/Brother/sane/setupSaneScan2 -e
79 }