wok-6.x annotate sane-backends/receipt @ rev 19802

pgrouting: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 25 21:46:07 2017 +0100 (2017-02-25)
parents d2c4737a0c7a
children caed28d90319
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 {
pascal@19294 21 sed -i 's|prefix}/doc|prefix}/share/doc|' configure
slaxemulator@12330 22 patch -Np1 -i $stuff/libv4l-0.8.3.patch
slaxemulator@12330 23 # fix https://bugs.archlinux.org/task/26114
slaxemulator@12330 24 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
pankso@648 25 ./configure \
pankso@648 26 --prefix=/usr \
pankso@648 27 --sysconfdir=/etc \
pankso@648 28 --mandir=/usr/share/man \
pascal@1514 29 $CONFIGURE_ARGS &&
pascal@1514 30 make &&
slaxemulator@12330 31 make -j 1 DESTDIR=$DESTDIR install
slaxemulator@8619 32
slaxemulator@8619 33 # copy the missing udev rule
slaxemulator@12330 34 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d
slaxemulator@12330 35 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules
pankso@648 36 }
pankso@648 37
pankso@648 38 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@648 39 genpkg_rules()
pankso@648 40 {
slaxemulator@8619 41 mkdir -p $fs/usr/lib $fs/usr/share \
pascal@18237 42 $fs/var/lock/sane $fs/etc/sane.d \
pascal@18237 43 $fs/var/www/tazpanel/lib \
pascal@18242 44 $fs/var/www/tazpanel/report.d \
pascal@18237 45 $fs/var/www/tazpanel/menu.d/hardware
pankso@648 46
pascal@15000 47 cp -a $install/etc/sane.d $fs/etc
pascal@15000 48 cp -a $install/usr/bin $fs/usr
pascal@15000 49 cp -a $install/usr/sbin $fs/usr
pascal@15000 50 cp -a $install/usr/lib/*.so* $fs/usr/lib
pascal@15000 51 cp -a $install/usr/lib/sane $fs/usr/lib
pascal@15000 52 cp -a $install/usr/share/sane $fs/usr/share
pascal@18237 53 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/
pascal@18242 54 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/
pascal@18237 55 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/
pascal@18237 56 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane
jozee@3468 57
jozee@3468 58 # fix groups/permissions on /var/lock/sane ; add it to scanner group
slaxemulator@8619 59 chmod 775 "$fs/var/lock/sane"
slaxemulator@8619 60 chgrp 96 "$fs/var/lock/sane"
jozee@5072 61
slaxemulator@8619 62 # fix hp officejets
slaxemulator@8619 63 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
pankso@648 64 }
jozee@3468 65
jozee@3468 66 post_install()
jozee@3468 67 {
pascal@18730 68 tazpkg reconfigure udev --root="$1"
jozee@5056 69
jozee@3468 70 # add group scanner
pascal@18730 71 if ! grep -q scanner "$1/etc/group" ; then
pascal@18730 72 chroot "$1/" 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@18750 77 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
pascal@18730 78 [ -e "$1/var/www/tazpanel/tmp" ] ||
pascal@18730 79 ln -s /tmp "$1/var/www/tazpanel/tmp"
jozee@3468 80 }
jozee@3468 81
jozee@3468 82 post_remove()
jozee@3468 83 {
slaxemulator@12330 84 chroot "$1/" delgroup scanner & >/dev/null
jozee@3468 85 }