wok annotate sane-backends/receipt @ rev 24035

updated sane-backends and sane-backends-dev (1.0.22 -> 1.0.24)
author Hans-G?nter Theisgen
date Sun Apr 11 15:30:14 2021 +0100 (2021-04-11)
parents 970c5ec9a60a
children dc0f7fd1ff7d
rev   line source
pankso@648 1 # SliTaz package receipt.
pankso@648 2
pankso@648 3 PACKAGE="sane-backends"
Hans-G?nter@24035 4 VERSION="1.0.24"
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"
Hans-G?nter@24035 9 WEB_SITE="http://www.sane-project.org/"
Hans-G?nter@24035 10
pankso@648 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
Hans-G?nter@24035 12 WGET_URL="https://gitlab.com/sane-project/backends/-/archive/RELEASE_${VERSION//./_}/backends-RELEASE_${VERSION//./_}.tar.gz"
pankso@648 13
Hans-G?nter@24035 14 DEPENDS="jpeg libgphoto2 libltdl libusb-compat libv4l tiff zlib"
Hans-G?nter@24035 15 BUILD_DEPENDS="jpeg-dev libgphoto2-dev libtool libusb-compat-dev
Hans-G?nter@24035 16 libv4l-dev tiff-dev zlib-dev"
Hans-G?nter@24035 17 SUGGESTED="gocr imagemagick sane-backends-lang tesseract-ocr"
erjo@9948 18
pankso@648 19 # Rules to configure and make the package.
pankso@648 20 compile_rules()
pankso@648 21 {
Hans-G?nter@24035 22 # 1.0.24: no longer needed
Hans-G?nter@24035 23 # sed -i 's|prefix}/doc|prefix}/share/doc|' configure
Hans-G?nter@24035 24
Hans-G?nter@24035 25 # 1.0.24: no longer needed
Hans-G?nter@24035 26 # patch -Np1 -i $stuff/libv4l-0.8.3.patch
Hans-G?nter@24035 27
Hans-G?nter@24035 28 # 1.0.24: no longer needed
slaxemulator@12330 29 # fix https://bugs.archlinux.org/task/26114
Hans-G?nter@24035 30 # patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
Hans-G?nter@24035 31
Hans-G?nter@24035 32 ./configure \
Hans-G?nter@24035 33 --prefix=/usr \
Hans-G?nter@24035 34 --with-docdir=/usr/share/doc/$PACKAGE-$VERSION \
Hans-G?nter@24035 35 --sysconfdir=/etc \
Hans-G?nter@24035 36 --mandir=/usr/share/man \
pascal@1514 37 $CONFIGURE_ARGS &&
pascal@1514 38 make &&
slaxemulator@12330 39 make -j 1 DESTDIR=$DESTDIR install
slaxemulator@8619 40
slaxemulator@8619 41 # copy the missing udev rule
Hans-G?nter@24035 42 [ ! -d $DESTDIR/etc/udev/rules.d ] &&
Hans-G?nter@24035 43 mkdir -p $DESTDIR/etc/udev/rules.d
Hans-G?nter@24035 44 cp -a $src/tools/udev/libsane.rules \
Hans-G?nter@24035 45 $DESTDIR/etc/udev/rules.d/55-sane.rules
pankso@648 46 }
pankso@648 47
pankso@648 48 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@648 49 genpkg_rules()
pankso@648 50 {
Hans-G?nter@24035 51 mkdir -p $fs/etc/sane.d
Hans-G?nter@24035 52 mkdir -p $fs/usr/lib
Hans-G?nter@24035 53 mkdir -p $fs/usr/share
Hans-G?nter@24035 54 mkdir -p $fs/var/lock/sane
Hans-G?nter@24035 55 mkdir -p $fs/var/www/tazpanel/lib
Hans-G?nter@24035 56 mkdir -p $fs/var/www/tazpanel/menu.d/hardware
Hans-G?nter@24035 57 mkdir -p $fs/var/www/tazpanel/report.d
Hans-G?nter@24035 58 mkdir -p $fs/var/www/tazpanel/styles/default/images
Hans-G?nter@24035 59
Hans-G?nter@24035 60 cp -a $install/etc/sane.d $fs/etc
Hans-G?nter@24035 61
Hans-G?nter@24035 62 cp -a $install/usr/bin $fs/usr
Hans-G?nter@24035 63 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@24035 64 cp -a $install/usr/lib/*.so* $fs/usr/lib
Hans-G?nter@24035 65 cp -a $install/usr/lib/sane $fs/usr/lib
Hans-G?nter@24035 66 cp -a $install/usr/share/sane $fs/usr/share
Hans-G?nter@24035 67
Hans-G?nter@24035 68 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/
Hans-G?nter@24035 69 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/
Hans-G?nter@24035 70 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/
Hans-G?nter@24035 71 cp $stuff/tazpanel/drag.gif $fs/var/www/tazpanel/styles/default/images/
Hans-G?nter@24035 72 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane
Hans-G?nter@24035 73
Hans-G?nter@24035 74 # fix groups and permissions on /var/lock/sane ; add it to scanner group
slaxemulator@8619 75 chmod 775 "$fs/var/lock/sane"
slaxemulator@8619 76 chgrp 96 "$fs/var/lock/sane"
jozee@5072 77
slaxemulator@8619 78 # fix hp officejets
slaxemulator@8619 79 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
pankso@648 80 }
jozee@3468 81
jozee@3468 82 post_install()
jozee@3468 83 {
pascal@18730 84 tazpkg reconfigure udev --root="$1"
jozee@5056 85
jozee@3468 86 # add group scanner
Hans-G?nter@24035 87 if ! grep -q scanner "$1/etc/group"
Hans-G?nter@24035 88 then
pascal@18730 89 chroot "$1/" addgroup -g 96 scanner
jozee@4966 90 fi
Hans-G?nter@24035 91
Hans-G?nter@24035 92 chroot "$1/" chgrp scanner /usr/bin/scanimage
Hans-G?nter@24035 93 chmod 4750 $1/usr/bin/scanimage
Hans-G?nter@24035 94
pascal@20319 95 echo
Hans-G?nter@24035 96 echo " ADD user(s) to group scanner to use sane: addgroup <user> scanner"
pascal@18237 97
pascal@18750 98 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
pascal@18730 99 [ -e "$1/var/www/tazpanel/tmp" ] ||
Hans-G?nter@24035 100 ln -s /tmp "$1/var/www/tazpanel/tmp"
jozee@3468 101 }
jozee@3468 102
jozee@3468 103 post_remove()
jozee@3468 104 {
Hans-G?nter@24035 105 # delete group scanner
slaxemulator@12330 106 chroot "$1/" delgroup scanner & >/dev/null
jozee@3468 107 }