wok view sane-backends/receipt @ rev 14390

eet-dev: update deps
author Dominique Corbex <domcox@slitaz.org>
date Tue Apr 23 07:02:34 2013 +0200 (2013-04-23)
parents b06403cb490b
children 380ffe05937a
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.sane-project.org/"
10 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
12 DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl"
13 BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \
14 libgphoto2-dev libtool"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 patch -Np1 -i $stuff/libv4l-0.8.3.patch
21 # fix https://bugs.archlinux.org/task/26114
22 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
23 ./configure \
24 --prefix=/usr \
25 --sysconfdir=/etc \
26 --mandir=/usr/share/man \
27 $CONFIGURE_ARGS &&
28 make &&
29 make -j 1 DESTDIR=$DESTDIR install
31 # copy the missing udev rule
32 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d
33 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 mkdir -p $fs/usr/lib $fs/usr/share \
40 $fs/var/lock/sane $fs/etc/sane.d
42 cp -a $_pkg/etc/sane.d $fs/etc
43 cp -a $_pkg/usr/bin $fs/usr
44 cp -a $_pkg/usr/sbin $fs/usr
45 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
46 cp -a $_pkg/usr/lib/sane $fs/usr/lib
47 cp -a $_pkg/usr/share/sane $fs/usr/share
49 # fix groups/permissions on /var/lock/sane ; add it to scanner group
50 chmod 775 "$fs/var/lock/sane"
51 chgrp 96 "$fs/var/lock/sane"
53 # fix hp officejets
54 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
55 }
57 post_install()
58 {
59 local root
60 root=$1
62 tazpkg reconfigure udev --root=$root
64 # add group scanner
65 if ! grep -q scanner $root/etc/group ; then
66 chroot "$root/" addgroup -g 96 scanner
67 fi
69 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
70 }
72 post_remove()
73 {
74 chroot "$1/" delgroup scanner & >/dev/null
75 }