wok-current view sane-backends/receipt @ rev 18862
Up tzdata(2016a)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Jan 28 17:55:47 2016 +0200 (2016-01-28) |
parents | 9e01bc6321ea |
children | a8e75e9bae6c |
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 patch -Np1 -i $stuff/libv4l-0.8.3.patch
22 # fix https://bugs.archlinux.org/task/26114
23 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
24 ./configure \
25 --prefix=/usr \
26 --sysconfdir=/etc \
27 --mandir=/usr/share/man \
28 $CONFIGURE_ARGS &&
29 make &&
30 make -j 1 DESTDIR=$DESTDIR install
32 # copy the missing udev rule
33 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d
34 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules
35 }
37 # Rules to gen a SliTaz package suitable for Tazpkg.
38 genpkg_rules()
39 {
40 mkdir -p $fs/usr/lib $fs/usr/share \
41 $fs/var/lock/sane $fs/etc/sane.d \
42 $fs/var/www/tazpanel/lib \
43 $fs/var/www/tazpanel/report.d \
44 $fs/var/www/tazpanel/menu.d/hardware
46 cp -a $install/etc/sane.d $fs/etc
47 cp -a $install/usr/bin $fs/usr
48 cp -a $install/usr/sbin $fs/usr
49 cp -a $install/usr/lib/*.so* $fs/usr/lib
50 cp -a $install/usr/lib/sane $fs/usr/lib
51 cp -a $install/usr/share/sane $fs/usr/share
52 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/
53 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/
54 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/
55 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane
57 # fix groups/permissions on /var/lock/sane ; add it to scanner group
58 chmod 775 "$fs/var/lock/sane"
59 chgrp 96 "$fs/var/lock/sane"
61 # fix hp officejets
62 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
63 }
65 post_install()
66 {
67 tazpkg reconfigure udev --root="$1"
69 # add group scanner
70 if ! grep -q scanner "$1/etc/group" ; then
71 chroot "$1/" addgroup -g 96 scanner
72 fi
74 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
76 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
77 [ -e "$1/var/www/tazpanel/tmp" ] ||
78 ln -s /tmp "$1/var/www/tazpanel/tmp"
79 }
81 post_remove()
82 {
83 chroot "$1/" delgroup scanner & >/dev/null
84 }