wok rev 3468

Up: sane-backends & -dev; fix permissions and udev rule;create grp scanner
author Rohit Joshi <jozee@slitaz.org>
date Tue Jun 16 12:16:43 2009 +0000 (2009-06-16)
parents 153b06465dc8
children aab008b12bb3
files sane-backends-dev/receipt sane-backends/receipt
line diff
     1.1 --- a/sane-backends-dev/receipt	Tue Jun 16 10:24:59 2009 +0000
     1.2 +++ b/sane-backends-dev/receipt	Tue Jun 16 12:16:43 2009 +0000
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="sane-backends-dev"
     1.7 -VERSION="1.0.19"
     1.8 +VERSION="1.0.20"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="Sane devel files."
    1.11  MAINTAINER="pankso@slitaz.org"
     2.1 --- a/sane-backends/receipt	Tue Jun 16 10:24:59 2009 +0000
     2.2 +++ b/sane-backends/receipt	Tue Jun 16 12:16:43 2009 +0000
     2.3 @@ -1,15 +1,15 @@
     2.4  # SliTaz package receipt.
     2.5  
     2.6  PACKAGE="sane-backends"
     2.7 -VERSION="1.0.19"
     2.8 +VERSION="1.0.20"
     2.9  CATEGORY="system-tools"
    2.10  SHORT_DESC="Scanner Access Now Easy."
    2.11  MAINTAINER="pankso@slitaz.org"
    2.12 -DEPENDS="libusb jpeg tiff zlib"
    2.13 -BUILD_DEPENDS="libusb-dev libusb"
    2.14 +DEPENDS="libusb jpeg tiff zlib libgphoto2"
    2.15 +BUILD_DEPENDS="libusb-dev libusb libgphoto2-dev"
    2.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.17  WEB_SITE="http://www.sane-project.org/"
    2.18 -WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
    2.19 +WGET_URL="ftp://ftp.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
    2.20  
    2.21  # Rules to configure and make the package.
    2.22  compile_rules()
    2.23 @@ -27,7 +27,8 @@
    2.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    2.25  genpkg_rules()
    2.26  {
    2.27 -	mkdir -p $fs/etc $fs/usr/lib $fs/usr/share
    2.28 +	mkdir -p $fs/etc/udev/rules.d  $fs/usr/lib $fs/usr/share \
    2.29 +	         $fs/var/lock/sane
    2.30  	
    2.31  	cp -a $_pkg/etc/sane.d $fs/etc
    2.32  	cp -a $_pkg/usr/bin $fs/usr
    2.33 @@ -35,4 +36,28 @@
    2.34  	cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
    2.35  	cp -a $_pkg/usr/lib/sane $fs/usr/lib
    2.36  	cp -a $_pkg/usr/share/sane $fs/usr/share
    2.37 +	
    2.38 +	# copy the missing udev rule
    2.39 +	cp -a $src/tools/udev/libsane.rules $fs/etc/udev/rules.d/55-sane.rules
    2.40 +	
    2.41 +	# fix groups/permissions on /var/lock/sane ; add it to scanner group
    2.42 +   chmod 775 "$fs/var/lock/sane"
    2.43 +   chgrp 96 "$fs/var/lock/sane"
    2.44 +
    2.45  }
    2.46 +
    2.47 +post_install()
    2.48 +{
    2.49 +	local root
    2.50 +	root=$1
    2.51 +	
    2.52 +	# add group scanner
    2.53 +	getent group scanner >/dev/null || addgroup -g 96 scanner
    2.54 +	
    2.55 +	echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
    2.56 +}
    2.57 +
    2.58 +post_remove()
    2.59 +{
    2.60 +	delgroup scanner & >/dev/null
    2.61 +}