wok-next view brscan/receipt @ rev 21557
updated cmark-gfm (0.28.3.gfm.19 -> 0.29.0.gfm.0)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Jun 22 14:08:07 2020 +0100 (2020-06-22) |
parents | d5aab818505e |
children |
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" # FIXME 404
10 HOST_ARCH="i486"
12 TARBALL="brscan-src-$VERSION.tar.gz"
13 #WGET_URL="http://solutions.brother.com/Library/sol/printer/linux/rpmfiles/sane_source/$TARBALL"
14 WGET_URL="http://mirror1.slitaz.org/sources/packages/b/$TARBALL"
16 BUILD_DEPENDS="file ncurses-dev libusb-compat-dev"
17 SPLIT="brscan2"
19 compile_rules() {
20 case $ARCH in
21 i?86)
22 cd brscan
23 ./configure $CONFIGURE_ARGS || return 1
24 ;;
25 x86_64)
26 cd brscan64
27 ;;
28 esac
30 sed -i '/mk_package/d' Makefile
31 make -j1 &&
32 {
33 cd ..
34 mkdir -p $install
35 cp -a brscan $install
36 }
38 fix symlinks
39 }
41 genpkg_rules() {
42 case $PACKAGE in
43 brscan)
44 mkdir -p $fs/usr/bin $fs/usr/lib/sane
45 for i in BHL BHL2 BHL2FB BHLFB BHMFB BHminiFB YL4 YL4FB \
46 ZL2 ZL2FB ZLe ZLeFB; do
47 mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
48 cp -a $install/brscan/libbrcolm/GrayCmData/$i/* \
49 $fs/usr/local/Brother/sane/GrayCmData/$i
50 chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i/*
51 done
52 cp $install/brscan/backend_brscan/.libs/libsane-brother.so.1.0.7 \
53 $fs/usr/lib/sane/libsane-brother.so.1.0.7
54 ln -s libsane-brother.so.1.0.7 $fs/usr/lib/sane/libsane-brother.so.1
55 ln -s libsane-brother.so.1 $fs/usr/lib/sane/libsane-brother.so
56 cp $install/brscan/libbrscandec/libbrscandec.so.1.0.0 \
57 $fs/usr/lib/libbrscandec.so.1.0.0
58 chmod 755 $fs/usr/lib/libbrscandec.so.1.0.0
59 ln -s libbrscandec.so.1.0.0 $fs/usr/lib/libbrscandec.so.1
60 ln -s libbrscandec.so.1 $fs/usr/lib/libbrscandec.so
61 cp $install/brscan/libbrcolm/libbrcolm.so.1.0.0 \
62 $fs/usr/lib/libbrcolm.so.1.0.0
63 ln -s libbrcolm.so.1.0.0 $fs/usr/lib/libbrcolm.so.1
64 ln -s libbrcolm.so.1 $fs/usr/lib/libbrcolm.so
65 cp $install/brscan/mk_package/Brsane.ini \
66 $fs/usr/local/Brother/sane/Brsane.ini
67 cp $install/brscan/mk_package/brsanenetdevice.cfg \
68 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
69 chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice.cfg
70 cp $install/brscan/netconfig/brsaneconfig \
71 $fs/usr/local/Brother/sane/brsaneconfig
72 ln -s /usr/local/Brother/sane/brsaneconfig $fs/usr/bin/brsaneconfig
73 cp $install/brscan/mk_package/setupSaneScan \
74 $fs/usr/local/Brother/sane/setupSaneScan
75 chmod 755 $fs/usr/local/Brother/sane/setupSaneScan
76 DEPENDS="sane-backends ncurses"
77 TAGS="scanner driver"
78 ;;
79 brscan2)
80 mkdir -p $fs/usr/bin $fs/usr/lib/sane $fs/usr/local/Brother/sane/models2
81 for i in ALL AL; do
82 mkdir -p $fs/usr/local/Brother/sane/GrayCmData/$i
83 cp -a $src/brscan/libbrcolm2/GrayCmData/$i/* \
84 $fs/usr/local/Brother/sane/GrayCmData/$i
85 chmod 644 $fs/usr/local/Brother/sane/GrayCmData/$i
86 done
87 cp $src/brscan/backend_brscan2/.libs/libsane-brother2.so.1.0.7 \
88 $fs/usr/lib/sane/libsane-brother2.so.1.0.7
89 ln -s libsane-brother2.so.1.0.7 $fs/usr/lib/sane/libsane-brother2.so.1
90 ln -s libsane-brother2.so.1 $fs/usr/lib/sane/libsane-brother2.so
91 cp $src/brscan/libbrscandec2/libbrscandec2.so.1.0.0 \
92 $fs/usr/lib/libbrscandec2.so.1.0.0
93 chmod 755 $fs/usr/lib/libbrscandec2.so.1.0.0
94 ln -s libbrscandec2.so.1.0.0 $fs/usr/lib/libbrscandec2.so.1
95 ln -s libbrscandec2.so.1 $fs/usr/lib/libbrscandec2.so
96 cp $src/brscan/libbrcolm2/libbrcolm2.so.1.0.0 \
97 $fs/usr/lib/libbrcolm2.so.1.0.0
98 chmod 755 $fs/usr/lib/libbrcolm2.so.1.0.0
99 ln -s libbrcolm2.so.1.0.0 $fs/usr/lib/libbrcolm2.so.1
100 ln -s libbrcolm2.so.1 $fs/usr/lib/libbrcolm2.so
101 while read line; do
102 echo $line
103 echo $line | grep -q 'Support Model' || continue
104 cat <<EOT
105 0x01eb,6,1,"MFC-7320",131,4
106 0x01e7,6,1,"MFC-7340",131,4
107 0x01e6,6,1,"MFC-7440N",131,4
108 0x01ee,6,1,"MFC-7450",131,4
109 0x01ed,6,1,"MFC-7840N",131,4
110 0x01e5,6,1,"MFC-7840W",131,4
111 0x01ea,6,1,"DCP-7030",131,4
112 0x01e9,6,1,"DCP-7040",131,4
113 0x01e8,6,1,"DCP-7045N",131,4
115 EOT
116 done < $src/brscan/mk_package/Brsane2.ini > \
117 $fs/usr/local/Brother/sane/Brsane2.ini
118 chmod 644 $fs/usr/local/Brother/sane/Brsane2.ini
119 cp $src/brscan/mk_package/brsanenetdevice2.cfg \
120 $fs/usr/local/Brother/sane/brsanenetdevice2.cfg
121 chmod 666 $fs/usr/local/Brother/sane/brsanenetdevice2.cfg
122 cp $src/brscan/netconfig/brsaneconfig2 \
123 $fs/usr/local/Brother/sane/brsaneconfig2
124 ln -s /usr/local/Brother/sane/brsaneconfig2 $fs/usr/bin/brsaneconfig2
125 cp $src/brscan/mk_package/setupSaneScan2 \
126 $fs/usr/local/Brother/sane/setupSaneScan2
127 chmod 755 $fs/usr/local/Brother/sane/setupSaneScan2
128 cp $src/brscan/mk_package/ext1.ini \
129 $fs/usr/local/Brother/sane/models2/ext1.ini
130 CAT="office|part 2"
131 DEPENDS="sane-backends"
132 TAGS="scanner driver"
133 ;;
134 esac
135 }
137 post_install_brscan() {
138 chroot "$1/" /usr/local/Brother/sane/setupSaneScan -i
139 }
141 pre_remove_brscan() {
142 chroot "$1/" /usr/local/Brother/sane/setupSaneScan -e
143 }
145 post_install_brscan2() {
146 chroot "$1/" /usr/local/Brother/sane/setupSaneScan2 -i
147 }
149 pre_remove_brscan2() {
150 chroot "$1/" /usr/local/Brother/sane/setupSaneScan2 -e
151 }