wok-next annotate sane-backends/receipt @ rev 9780

clex: update to fix WGET_URL (my favorite text mode fm)
author Christophe Lincoln <pankso@slitaz.org>
date Wed May 11 23:06:47 2011 +0200 (2011-05-11)
parents 12dc00e8fec9
children 4d40b2bc1125
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"
gokhlayeh@9395 8 DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libtool"
pankso@648 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@648 10 WEB_SITE="http://www.sane-project.org/"
jozee@3468 11 WGET_URL="ftp://ftp.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
pankso@648 12
pankso@648 13 # Rules to configure and make the package.
pankso@648 14 compile_rules()
pankso@648 15 {
pankso@648 16 cd $src
pankso@648 17 ./configure \
pankso@648 18 --prefix=/usr \
pankso@648 19 --sysconfdir=/etc \
pankso@648 20 --mandir=/usr/share/man \
pascal@1514 21 $CONFIGURE_ARGS &&
pascal@1514 22 make &&
gokhlayeh@7978 23 make -j 1 DESTDIR=$PWD/_pkg install
slaxemulator@8619 24
slaxemulator@8619 25 # copy the missing udev rule
slaxemulator@8619 26 [ ! -d $PWD/_pkg/etc/udev/rules.d ] && mkdir -p $PWD/_pkg/etc/udev/rules.d
slaxemulator@8619 27 cp -a $src/tools/udev/libsane.rules $PWD/_pkg/etc/udev/rules.d/55-sane.rules
pankso@648 28 }
pankso@648 29
pankso@648 30 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@648 31 genpkg_rules()
pankso@648 32 {
slaxemulator@8619 33 mkdir -p $fs/usr/lib $fs/usr/share \
slaxemulator@8619 34 $fs/var/lock/sane $fs/etc/sane.d
pankso@648 35
pankso@648 36 cp -a $_pkg/etc/sane.d $fs/etc
pankso@648 37 cp -a $_pkg/usr/bin $fs/usr
pankso@648 38 cp -a $_pkg/usr/sbin $fs/usr
pankso@648 39 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
pankso@648 40 cp -a $_pkg/usr/lib/sane $fs/usr/lib
pankso@648 41 cp -a $_pkg/usr/share/sane $fs/usr/share
jozee@3468 42
jozee@3468 43 # fix groups/permissions on /var/lock/sane ; add it to scanner group
slaxemulator@8619 44 chmod 775 "$fs/var/lock/sane"
slaxemulator@8619 45 chgrp 96 "$fs/var/lock/sane"
jozee@5072 46
slaxemulator@8619 47 # fix hp officejets
slaxemulator@8619 48 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
pankso@648 49 }
jozee@3468 50
jozee@3468 51 post_install()
jozee@3468 52 {
jozee@3468 53 local root
jozee@3468 54 root=$1
jozee@3468 55
jozee@5056 56 tazpkg reconfigure udev --root=$1
jozee@5056 57
jozee@3468 58 # add group scanner
jozee@5052 59 if ! grep -q scanner $root/etc/group ; then
jozee@4966 60 addgroup -g 96 scanner
jozee@4966 61 fi
jozee@3468 62
jozee@3468 63 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
jozee@3468 64 }
jozee@3468 65
jozee@3468 66 post_remove()
jozee@3468 67 {
jozee@3468 68 delgroup scanner & >/dev/null
jozee@3468 69 }