wok view sane-backends/receipt @ rev 16036
ARM: remove audiofile (dont compile on tank) and add xorg-recordproto
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Mar 09 03:50:37 2014 +0100 (2014-03-09) |
parents | 0f924bbd9a0d |
children | 140c18f428f0 |
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"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
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
43 cp -a $install/etc/sane.d $fs/etc
44 cp -a $install/usr/bin $fs/usr
45 cp -a $install/usr/sbin $fs/usr
46 cp -a $install/usr/lib/*.so* $fs/usr/lib
47 cp -a $install/usr/lib/sane $fs/usr/lib
48 cp -a $install/usr/share/sane $fs/usr/share
50 # fix groups/permissions on /var/lock/sane ; add it to scanner group
51 chmod 775 "$fs/var/lock/sane"
52 chgrp 96 "$fs/var/lock/sane"
54 # fix hp officejets
55 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
56 }
58 post_install()
59 {
60 local root
61 root=$1
63 tazpkg reconfigure udev --root=$root
65 # add group scanner
66 if ! grep -q scanner $root/etc/group ; then
67 chroot "$root/" addgroup -g 96 scanner
68 fi
70 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
71 }
73 post_remove()
74 {
75 chroot "$1/" delgroup scanner & >/dev/null
76 }