wok view sane-backends/receipt @ rev 5012
rm rpm in for loop to save RAM (thanks Eric)
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Sun Feb 28 19:50:05 2010 +0000 (2010-02-28) |
parents | 6c1482c59ac9 |
children | 11f6754dd242 |
line source
1 # SliTaz package receipt.
3 PACKAGE="sane-backends"
4 VERSION="1.0.20"
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 DESTDIR=$PWD/_pkg install
25 }
27 # Rules to gen a SliTaz package suitable for Tazpkg.
28 genpkg_rules()
29 {
30 mkdir -p $fs/etc/udev/rules.d $fs/usr/lib $fs/usr/share \
31 $fs/var/lock/sane
33 cp -a $_pkg/etc/sane.d $fs/etc
34 cp -a $_pkg/usr/bin $fs/usr
35 cp -a $_pkg/usr/sbin $fs/usr
36 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
37 cp -a $_pkg/usr/lib/sane $fs/usr/lib
38 cp -a $_pkg/usr/share/sane $fs/usr/share
40 # copy the missing udev rule
41 cp -a $src/tools/udev/libsane.rules $fs/etc/udev/rules.d/55-sane.rules
43 # fix groups/permissions on /var/lock/sane ; add it to scanner group
44 chmod 775 "$fs/var/lock/sane"
45 chgrp 96 "$fs/var/lock/sane"
47 }
49 post_install()
50 {
51 local root
52 root=$1
54 # add group scanner
55 if [ ! grep -q scanner $root/etc/group ]; then
56 addgroup -g 96 scanner
57 fi
59 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
60 }
62 post_remove()
63 {
64 delgroup scanner & >/dev/null
65 }