wok-6.x view sane-backends/receipt @ rev 21297
updated libshout and libshout-dev (2.2.1 -> 2.4.1)
author | Hans-G?nter Theisgen |
---|---|
date | Wed Apr 17 16:47:19 2019 +0100 (2019-04-17) |
parents | 19ad77dc1d71 |
children | 1b5e36efea1d |
line source
1 # SliTaz package receipt.
3 PACKAGE="sane-backends"
4 VERSION="1.0.22"
5 CATEGORY="system-tools"
6 SHORT_DESC="Scanner Access Now Easy."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.sane-project.org/"
11 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
13 DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl"
14 BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \
15 libgphoto2-dev libtool"
16 SUGGESTED="imagemagick gocr tesseract-ocr"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 sed -i 's|prefix}/doc|prefix}/share/doc|' configure
22 patch -Np1 -i $stuff/libv4l-0.8.3.patch
23 # fix https://bugs.archlinux.org/task/26114
24 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
25 ./configure \
26 --prefix=/usr \
27 --sysconfdir=/etc \
28 --mandir=/usr/share/man \
29 $CONFIGURE_ARGS &&
30 make &&
31 make -j 1 DESTDIR=$DESTDIR install
33 # copy the missing udev rule
34 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d
35 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/lib $fs/usr/share \
42 $fs/var/lock/sane $fs/etc/sane.d \
43 $fs/var/www/tazpanel/lib \
44 $fs/var/www/tazpanel/report.d \
45 $fs/var/www/tazpanel/menu.d/hardware \
46 $fs/var/www/tazpanel/styles/default/images
48 cp -a $install/etc/sane.d $fs/etc
49 cp -a $install/usr/bin $fs/usr
50 cp -a $install/usr/sbin $fs/usr
51 cp -a $install/usr/lib/*.so* $fs/usr/lib
52 cp -a $install/usr/lib/sane $fs/usr/lib
53 cp -a $install/usr/share/sane $fs/usr/share
54 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/
55 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/
56 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/
57 cp $stuff/tazpanel/drag.gif $fs/var/www/tazpanel/styles/default/images/
58 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane
60 # fix groups/permissions on /var/lock/sane ; add it to scanner group
61 chmod 775 "$fs/var/lock/sane"
62 chgrp 96 "$fs/var/lock/sane"
64 # fix hp officejets
65 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
66 }
68 post_install()
69 {
70 tazpkg reconfigure udev --root="$1"
72 # add group scanner
73 if ! grep -q scanner "$1/etc/group" ; then
74 chroot "$1/" addgroup -g 96 scanner
75 fi
76 chroot "$1/" chgrp scanner /usr/bin/scanimage
77 chmod 4750 $1/usr/bin/scanimage
79 echo
80 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
82 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
83 [ -e "$1/var/www/tazpanel/tmp" ] ||
84 ln -s /tmp "$1/var/www/tazpanel/tmp"
85 }
87 post_remove()
88 {
89 chroot "$1/" delgroup scanner & >/dev/null
90 }