wok annotate sane-backends/receipt @ rev 18734
Remove redundant messages in {pre|post}_{install|remove}() in random packages
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Dec 21 02:53:09 2015 +0200 (2015-12-21) |
parents | 1ed620c5ee23 |
children | d2c4737a0c7a |
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@18242 | 43 $fs/var/www/tazpanel/report.d \ |
pascal@18237 | 44 $fs/var/www/tazpanel/menu.d/hardware |
pankso@648 | 45 |
pascal@15000 | 46 cp -a $install/etc/sane.d $fs/etc |
pascal@15000 | 47 cp -a $install/usr/bin $fs/usr |
pascal@15000 | 48 cp -a $install/usr/sbin $fs/usr |
pascal@15000 | 49 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pascal@15000 | 50 cp -a $install/usr/lib/sane $fs/usr/lib |
pascal@15000 | 51 cp -a $install/usr/share/sane $fs/usr/share |
pascal@18237 | 52 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/ |
pascal@18242 | 53 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/ |
pascal@18237 | 54 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/ |
pascal@18237 | 55 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane |
jozee@3468 | 56 |
jozee@3468 | 57 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
slaxemulator@8619 | 58 chmod 775 "$fs/var/lock/sane" |
slaxemulator@8619 | 59 chgrp 96 "$fs/var/lock/sane" |
jozee@5072 | 60 |
slaxemulator@8619 | 61 # fix hp officejets |
slaxemulator@8619 | 62 echo "hpaio" >> "$fs/etc/sane.d/dll.conf" |
pankso@648 | 63 } |
jozee@3468 | 64 |
jozee@3468 | 65 post_install() |
jozee@3468 | 66 { |
pascal@18730 | 67 tazpkg reconfigure udev --root="$1" |
jozee@5056 | 68 |
jozee@3468 | 69 # add group scanner |
pascal@18730 | 70 if ! grep -q scanner "$1/etc/group" ; then |
pascal@18730 | 71 chroot "$1/" addgroup -g 96 scanner |
jozee@4966 | 72 fi |
jozee@3468 | 73 |
jozee@3468 | 74 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
pascal@18237 | 75 |
pascal@18730 | 76 [ -e "$1/var/www/tazpanel/tmp" ] || |
pascal@18730 | 77 ln -s /tmp "$1/var/www/tazpanel/tmp" |
jozee@3468 | 78 } |
jozee@3468 | 79 |
jozee@3468 | 80 post_remove() |
jozee@3468 | 81 { |
slaxemulator@12330 | 82 chroot "$1/" delgroup scanner & >/dev/null |
jozee@3468 | 83 } |