wok-next view brscan/receipt @ rev 20640

Up at-spi2-atk (2.26.1), at-spi2-core (2.26.2), atk (2.26.1), tazlito (492); add catpoint; fix lzma for 64 bit
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 01 14:16:10 2018 +0300 (2018-05-01)
parents e323d0535e2c
children 92b0135d5efa
line source
1 # SliTaz package receipt v2.
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 LICENSE="GPL2"
9 WEB_SITE="http://solutions.brother.com/linux/sol/printer/linux/sane_drivers.html"
11 TARBALL="brscan-src-$VERSION.tar.gz"
12 WGET_URL="http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/sane_source/$TARBALL"
14 BUILD_DEPENDS="file ncurses-dev libusb-compat-dev"
15 SPLIT="brscan2"
17 compile_rules() {
18 cd $src/brscan
19 ./configure $CONFIGURE_ARGS || return 1
20 sed -i '/mk_package/d' Makefile
21 make -j1 &&
22 {
23 cd ..
24 mkdir -p $DESTDIR
25 cp -a brscan $DESTDIR
26 }
27 }
29 genpkg_rules() {
30 case $PACKAGE in
31 brscan)
32 mkdir -p $fs/usr/bin $fs/usr/lib/sane
33 for i in BHL BHL2 BHL2FB BHLFB BHMFB BHminiFB YL4 YL4FB \
34 ZL2 ZL2FB ZLe ZLeFB; do
35 mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
36 cp -a $install/brscan/libbrcolm/GrayCmData/$i/* \
37 $fs/usr/local/Brother/sane/GrayCmData/$i
38 chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i/*
39 done
40 cp $install/brscan/backend_brscan/.libs/libsane-brother.so.1.0.7 \
41 $fs/usr/lib/sane/libsane-brother.so.1.0.7
42 ln -s libsane-brother.so.1.0.7 $fs/usr/lib/sane/libsane-brother.so.1
43 ln -s libsane-brother.so.1 $fs/usr/lib/sane/libsane-brother.so
44 cp $install/brscan/libbrscandec/libbrscandec.so.1.0.0 \
45 $fs/usr/lib/libbrscandec.so.1.0.0
46 chmod 755 $fs/usr/lib/libbrscandec.so.1.0.0
47 ln -s libbrscandec.so.1.0.0 $fs/usr/lib/libbrscandec.so.1
48 ln -s libbrscandec.so.1 $fs/usr/lib/libbrscandec.so
49 cp $install/brscan/libbrcolm/libbrcolm.so.1.0.0 \
50 $fs/usr/lib/libbrcolm.so.1.0.0
51 ln -s libbrcolm.so.1.0.0 $fs/usr/lib/libbrcolm.so.1
52 ln -s libbrcolm.so.1 $fs/usr/lib/libbrcolm.so
53 cp $install/brscan/mk_package/Brsane.ini \
54 $fs/usr/local/Brother/sane/Brsane.ini
55 cp $install/brscan/mk_package/brsanenetdevice.cfg \
56 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
57 chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
58 cp $install/brscan/netconfig/brsaneconfig \
59 $fs/usr/local/Brother/sane/brsaneconfig
60 ln -s /usr/local/Brother/sane/brsaneconfig $fs/usr/bin/brsaneconfig
61 cp $install/brscan/mk_package/setupSaneScan \
62 $fs/usr/local/Brother/sane/setupSaneScan
63 chmod 755 $fs/usr/local/Brother/sane/setupSaneScan
64 DEPENDS="sane-backends ncurses"
65 TAGS="scanner driver"
66 ;;
67 brscan2)
68 mkdir -p $fs/usr/bin $fs/usr/lib/sane $fs/usr/local/Brother/sane/models2
69 for i in ALL AL; do
70 mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
71 cp -a $src/brscan/libbrcolm2/GrayCmData/$i/* \
72 $fs/usr/local/Brother/sane/GrayCmData/$i
73 chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i
74 done
75 cp $src/brscan/backend_brscan2/.libs/libsane-brother2.so.1.0.7 \
76 $fs/usr/lib/sane/libsane-brother2.so.1.0.7
77 ln -s libsane-brother2.so.1.0.7 $fs/usr/lib/sane/libsane-brother2.so.1
78 ln -s libsane-brother2.so.1 $fs/usr/lib/sane/libsane-brother2.so
79 cp $src/brscan/libbrscandec2/libbrscandec2.so.1.0.0 \
80 $fs/usr/lib/libbrscandec2.so.1.0.0
81 chmod 755 $fs/usr/lib/libbrscandec2.so.1.0.0
82 ln -s libbrscandec2.so.1.0.0 $fs/usr/lib/libbrscandec2.so.1
83 ln -s libbrscandec2.so.1 $fs/usr/lib/libbrscandec2.so
84 cp $src/brscan/libbrcolm2/libbrcolm2.so.1.0.0 \
85 $fs/usr/lib/libbrcolm2.so.1.0.0
86 chmod 755 $fs/usr/lib/libbrcolm2.so.1.0.0
87 ln -s libbrcolm2.so.1.0.0 $fs/usr/lib/libbrcolm2.so.1
88 ln -s libbrcolm2.so.1 $fs/usr/lib/libbrcolm2.so
89 while read line; do
90 echo $line
91 echo $line | grep -q 'Support Model' || continue
92 cat <<EOT
93 0x01eb,6,1,"MFC-7320",131,4
94 0x01e7,6,1,"MFC-7340",131,4
95 0x01e6,6,1,"MFC-7440N",131,4
96 0x01ee,6,1,"MFC-7450",131,4
97 0x01ed,6,1,"MFC-7840N",131,4
98 0x01e5,6,1,"MFC-7840W",131,4
99 0x01ea,6,1,"DCP-7030",131,4
100 0x01e9,6,1,"DCP-7040",131,4
101 0x01e8,6,1,"DCP-7045N",131,4
103 EOT
104 done < $src/brscan/mk_package/Brsane2.ini > \
105 $fs/usr/local/Brother/sane/Brsane2.ini
106 chmod 644 $fs/usr/local/Brother/sane/Brsane2.ini
107 cp $src/brscan/mk_package/brsanenetdevice2.cfg \
108 $fs/usr/local/Brother/sane/brsanenetdevice2.cfg
109 chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice2.cfg
110 cp $src/brscan/netconfig/brsaneconfig2 \
111 $fs/usr/local/Brother/sane/brsaneconfig2
112 ln -s /usr/local/Brother/sane/brsaneconfig2 $fs/usr/bin/brsaneconfig2
113 cp $src/brscan/mk_package/setupSaneScan2 \
114 $fs/usr/local/Brother/sane/setupSaneScan2
115 chmod 755 $fs/usr/local/Brother/sane/setupSaneScan2
116 cp $src/brscan/mk_package/ext1.ini \
117 $fs/usr/local/Brother/sane/models2/ext1.ini
118 CAT="office|part 2"
119 DEPENDS="sane-backends"
120 TAGS="scanner driver"
121 ;;
122 esac
123 }
125 post_install_brscan() {
126 chroot "$1/" /usr/local/Brother/sane/setupSaneScan -i
127 }
129 pre_remove_brscan() {
130 chroot "$1/" /usr/local/Brother/sane/setupSaneScan -e
131 }
133 post_install_brscan2() {
134 chroot "$1/" /usr/local/Brother/sane/setupSaneScan2 -i
135 }
137 pre_remove_brscan2() {
138 chroot "$1/" /usr/local/Brother/sane/setupSaneScan2 -e
139 }