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