wok annotate sane-backends/receipt @ rev 14476
gst-plugins-base-dev: update deps+bdeps
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu May 02 22:38:49 2013 +0200 (2013-05-02) |
parents | b06403cb490b |
children | 380ffe05937a |
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" |
pankso@648 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@648 | 9 WEB_SITE="http://www.sane-project.org/" |
slaxemulator@12330 | 10 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL" |
pankso@648 | 11 |
erjo@9948 | 12 DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl" |
pascal@12357 | 13 BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \ |
pascal@12357 | 14 libgphoto2-dev libtool" |
erjo@9948 | 15 |
pankso@648 | 16 # Rules to configure and make the package. |
pankso@648 | 17 compile_rules() |
pankso@648 | 18 { |
pankso@648 | 19 cd $src |
slaxemulator@12330 | 20 patch -Np1 -i $stuff/libv4l-0.8.3.patch |
slaxemulator@12330 | 21 # fix https://bugs.archlinux.org/task/26114 |
slaxemulator@12330 | 22 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch |
pankso@648 | 23 ./configure \ |
pankso@648 | 24 --prefix=/usr \ |
pankso@648 | 25 --sysconfdir=/etc \ |
pankso@648 | 26 --mandir=/usr/share/man \ |
pascal@1514 | 27 $CONFIGURE_ARGS && |
pascal@1514 | 28 make && |
slaxemulator@12330 | 29 make -j 1 DESTDIR=$DESTDIR install |
slaxemulator@8619 | 30 |
slaxemulator@8619 | 31 # copy the missing udev rule |
slaxemulator@12330 | 32 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d |
slaxemulator@12330 | 33 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules |
pankso@648 | 34 } |
pankso@648 | 35 |
pankso@648 | 36 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@648 | 37 genpkg_rules() |
pankso@648 | 38 { |
slaxemulator@8619 | 39 mkdir -p $fs/usr/lib $fs/usr/share \ |
slaxemulator@8619 | 40 $fs/var/lock/sane $fs/etc/sane.d |
pankso@648 | 41 |
pankso@648 | 42 cp -a $_pkg/etc/sane.d $fs/etc |
pankso@648 | 43 cp -a $_pkg/usr/bin $fs/usr |
pankso@648 | 44 cp -a $_pkg/usr/sbin $fs/usr |
pankso@648 | 45 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
pankso@648 | 46 cp -a $_pkg/usr/lib/sane $fs/usr/lib |
pankso@648 | 47 cp -a $_pkg/usr/share/sane $fs/usr/share |
jozee@3468 | 48 |
jozee@3468 | 49 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
slaxemulator@8619 | 50 chmod 775 "$fs/var/lock/sane" |
slaxemulator@8619 | 51 chgrp 96 "$fs/var/lock/sane" |
jozee@5072 | 52 |
slaxemulator@8619 | 53 # fix hp officejets |
slaxemulator@8619 | 54 echo "hpaio" >> "$fs/etc/sane.d/dll.conf" |
pankso@648 | 55 } |
jozee@3468 | 56 |
jozee@3468 | 57 post_install() |
jozee@3468 | 58 { |
jozee@3468 | 59 local root |
jozee@3468 | 60 root=$1 |
jozee@3468 | 61 |
slaxemulator@12330 | 62 tazpkg reconfigure udev --root=$root |
jozee@5056 | 63 |
jozee@3468 | 64 # add group scanner |
jozee@5052 | 65 if ! grep -q scanner $root/etc/group ; then |
slaxemulator@12330 | 66 chroot "$root/" addgroup -g 96 scanner |
jozee@4966 | 67 fi |
jozee@3468 | 68 |
jozee@3468 | 69 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
jozee@3468 | 70 } |
jozee@3468 | 71 |
jozee@3468 | 72 post_remove() |
jozee@3468 | 73 { |
slaxemulator@12330 | 74 chroot "$1/" delgroup scanner & >/dev/null |
jozee@3468 | 75 } |