wok-6.x annotate sane-backends/receipt @ rev 5056
libgphoto2, scanner: reconfigure udev after addition of new rule
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Sat Mar 06 19:04:53 2010 +0000 (2010-03-06) |
parents | 11f6754dd242 |
children | 70bb3a6199fb |
rev | line source |
---|---|
pankso@648 | 1 # SliTaz package receipt. |
pankso@648 | 2 |
pankso@648 | 3 PACKAGE="sane-backends" |
jozee@3468 | 4 VERSION="1.0.20" |
pankso@648 | 5 CATEGORY="system-tools" |
pankso@648 | 6 SHORT_DESC="Scanner Access Now Easy." |
pankso@648 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@5007 | 8 DEPENDS="libusb jpeg tiff zlib libgphoto2 libv4l libtool" |
jozee@3468 | 9 BUILD_DEPENDS="libusb-dev libusb libgphoto2-dev" |
pankso@648 | 10 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@648 | 11 WEB_SITE="http://www.sane-project.org/" |
jozee@3468 | 12 WGET_URL="ftp://ftp.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL" |
pankso@648 | 13 |
pankso@648 | 14 # Rules to configure and make the package. |
pankso@648 | 15 compile_rules() |
pankso@648 | 16 { |
pankso@648 | 17 cd $src |
pankso@648 | 18 ./configure \ |
pankso@648 | 19 --prefix=/usr \ |
pankso@648 | 20 --sysconfdir=/etc \ |
pankso@648 | 21 --mandir=/usr/share/man \ |
pascal@1514 | 22 $CONFIGURE_ARGS && |
pascal@1514 | 23 make && |
pankso@648 | 24 make DESTDIR=$PWD/_pkg install |
pankso@648 | 25 } |
pankso@648 | 26 |
pankso@648 | 27 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@648 | 28 genpkg_rules() |
pankso@648 | 29 { |
jozee@3468 | 30 mkdir -p $fs/etc/udev/rules.d $fs/usr/lib $fs/usr/share \ |
jozee@3468 | 31 $fs/var/lock/sane |
pankso@648 | 32 |
pankso@648 | 33 cp -a $_pkg/etc/sane.d $fs/etc |
pankso@648 | 34 cp -a $_pkg/usr/bin $fs/usr |
pankso@648 | 35 cp -a $_pkg/usr/sbin $fs/usr |
pankso@648 | 36 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
pankso@648 | 37 cp -a $_pkg/usr/lib/sane $fs/usr/lib |
pankso@648 | 38 cp -a $_pkg/usr/share/sane $fs/usr/share |
jozee@3468 | 39 |
jozee@3468 | 40 # copy the missing udev rule |
jozee@3468 | 41 cp -a $src/tools/udev/libsane.rules $fs/etc/udev/rules.d/55-sane.rules |
jozee@3468 | 42 |
jozee@3468 | 43 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
jozee@3468 | 44 chmod 775 "$fs/var/lock/sane" |
jozee@3468 | 45 chgrp 96 "$fs/var/lock/sane" |
jozee@3468 | 46 |
pankso@648 | 47 } |
jozee@3468 | 48 |
jozee@3468 | 49 post_install() |
jozee@3468 | 50 { |
jozee@3468 | 51 local root |
jozee@3468 | 52 root=$1 |
jozee@3468 | 53 |
jozee@5056 | 54 tazpkg reconfigure udev --root=$1 |
jozee@5056 | 55 |
jozee@3468 | 56 # add group scanner |
jozee@5052 | 57 if ! grep -q scanner $root/etc/group ; then |
jozee@4966 | 58 addgroup -g 96 scanner |
jozee@4966 | 59 fi |
jozee@3468 | 60 |
jozee@3468 | 61 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
jozee@3468 | 62 } |
jozee@3468 | 63 |
jozee@3468 | 64 post_remove() |
jozee@3468 | 65 { |
jozee@3468 | 66 delgroup scanner & >/dev/null |
jozee@3468 | 67 } |