wok-6.x view sane-backends/receipt @ rev 18430

Up gnuradio (3.7.8)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Sep 21 18:28:34 2015 +0200 (2015-09-21)
parents 140c18f428f0
children 9e01bc6321ea
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 local root
68 root=$1
70 tazpkg reconfigure udev --root=$root
72 # add group scanner
73 if ! grep -q scanner $root/etc/group ; then
74 chroot "$root/" addgroup -g 96 scanner
75 fi
77 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
79 [ -e $root/var/www/tazpanel/tmp ] ||
80 ln -s /tmp $root/var/www/tazpanel/tmp
81 }
83 post_remove()
84 {
85 chroot "$1/" delgroup scanner & >/dev/null
86 }