wok-current annotate sane-backends/receipt @ rev 8724
Up: libtaz 0.0.7, tazchroot 0.0.7.1, tazwok-experimental 0.0.7
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Feb 18 20:57:16 2011 +0100 (2011-02-18) |
parents | 67b4f2547fcb |
children | 7ba9895e1216 |
rev | line source |
---|---|
pankso@648 | 1 # SliTaz package receipt. |
pankso@648 | 2 |
pankso@648 | 3 PACKAGE="sane-backends" |
slaxemulator@8619 | 4 VERSION="1.0.22" |
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 && |
gokhlayeh@7978 | 24 make -j 1 DESTDIR=$PWD/_pkg install |
slaxemulator@8619 | 25 |
slaxemulator@8619 | 26 # copy the missing udev rule |
slaxemulator@8619 | 27 [ ! -d $PWD/_pkg/etc/udev/rules.d ] && mkdir -p $PWD/_pkg/etc/udev/rules.d |
slaxemulator@8619 | 28 cp -a $src/tools/udev/libsane.rules $PWD/_pkg/etc/udev/rules.d/55-sane.rules |
pankso@648 | 29 } |
pankso@648 | 30 |
pankso@648 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@648 | 32 genpkg_rules() |
pankso@648 | 33 { |
slaxemulator@8619 | 34 mkdir -p $fs/usr/lib $fs/usr/share \ |
slaxemulator@8619 | 35 $fs/var/lock/sane $fs/etc/sane.d |
pankso@648 | 36 |
pankso@648 | 37 cp -a $_pkg/etc/sane.d $fs/etc |
pankso@648 | 38 cp -a $_pkg/usr/bin $fs/usr |
pankso@648 | 39 cp -a $_pkg/usr/sbin $fs/usr |
pankso@648 | 40 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
pankso@648 | 41 cp -a $_pkg/usr/lib/sane $fs/usr/lib |
pankso@648 | 42 cp -a $_pkg/usr/share/sane $fs/usr/share |
jozee@3468 | 43 |
jozee@3468 | 44 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
slaxemulator@8619 | 45 chmod 775 "$fs/var/lock/sane" |
slaxemulator@8619 | 46 chgrp 96 "$fs/var/lock/sane" |
jozee@5072 | 47 |
slaxemulator@8619 | 48 # fix hp officejets |
slaxemulator@8619 | 49 echo "hpaio" >> "$fs/etc/sane.d/dll.conf" |
pankso@648 | 50 } |
jozee@3468 | 51 |
jozee@3468 | 52 post_install() |
jozee@3468 | 53 { |
jozee@3468 | 54 local root |
jozee@3468 | 55 root=$1 |
jozee@3468 | 56 |
jozee@5056 | 57 tazpkg reconfigure udev --root=$1 |
jozee@5056 | 58 |
jozee@3468 | 59 # add group scanner |
jozee@5052 | 60 if ! grep -q scanner $root/etc/group ; then |
jozee@4966 | 61 addgroup -g 96 scanner |
jozee@4966 | 62 fi |
jozee@3468 | 63 |
jozee@3468 | 64 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
jozee@3468 | 65 } |
jozee@3468 | 66 |
jozee@3468 | 67 post_remove() |
jozee@3468 | 68 { |
jozee@3468 | 69 delgroup scanner & >/dev/null |
jozee@3468 | 70 } |