wok-current view sane-backends/receipt @ rev 8747
Up: tazwok-experimental 0.0.7.2
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Feb 20 03:18:35 2011 +0100 (2011-02-20) |
parents | 67b4f2547fcb |
children | 7ba9895e1216 |
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 DEPENDS="libusb jpeg tiff zlib libgphoto2 libv4l libtool"
9 BUILD_DEPENDS="libusb-dev libusb libgphoto2-dev"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.sane-project.org/"
12 WGET_URL="ftp://ftp.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 ./configure \
19 --prefix=/usr \
20 --sysconfdir=/etc \
21 --mandir=/usr/share/man \
22 $CONFIGURE_ARGS &&
23 make &&
24 make -j 1 DESTDIR=$PWD/_pkg install
26 # copy the missing udev rule
27 [ ! -d $PWD/_pkg/etc/udev/rules.d ] && mkdir -p $PWD/_pkg/etc/udev/rules.d
28 cp -a $src/tools/udev/libsane.rules $PWD/_pkg/etc/udev/rules.d/55-sane.rules
29 }
31 # Rules to gen a SliTaz package suitable for Tazpkg.
32 genpkg_rules()
33 {
34 mkdir -p $fs/usr/lib $fs/usr/share \
35 $fs/var/lock/sane $fs/etc/sane.d
37 cp -a $_pkg/etc/sane.d $fs/etc
38 cp -a $_pkg/usr/bin $fs/usr
39 cp -a $_pkg/usr/sbin $fs/usr
40 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
41 cp -a $_pkg/usr/lib/sane $fs/usr/lib
42 cp -a $_pkg/usr/share/sane $fs/usr/share
44 # fix groups/permissions on /var/lock/sane ; add it to scanner group
45 chmod 775 "$fs/var/lock/sane"
46 chgrp 96 "$fs/var/lock/sane"
48 # fix hp officejets
49 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
50 }
52 post_install()
53 {
54 local root
55 root=$1
57 tazpkg reconfigure udev --root=$1
59 # add group scanner
60 if ! grep -q scanner $root/etc/group ; then
61 addgroup -g 96 scanner
62 fi
64 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
65 }
67 post_remove()
68 {
69 delgroup scanner & >/dev/null
70 }