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

etherape: goocanvas dependency modified
author Hans-G?nter Theisgen
date Thu Mar 17 07:29:02 2022 +0100 (2022-03-17)
parents 1b5e36efea1d
children
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
pascal@24061 19 current_version()
pascal@24061 20 {
pascal@24061 21 wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
pascal@24061 22 sed '/tar.gz/!d;s|.*/backends-\(.*\).tar.gz".*|\1|;q'
pascal@24061 23 }
pascal@24061 24
pankso@648 25 # Rules to configure and make the package.
pankso@648 26 compile_rules()
pankso@648 27 {
Hans-G?nter@24035 28 # 1.0.24: no longer needed
Hans-G?nter@24035 29 # sed -i 's|prefix}/doc|prefix}/share/doc|' configure
Hans-G?nter@24035 30
Hans-G?nter@24035 31 # 1.0.24: no longer needed
Hans-G?nter@24035 32 # patch -Np1 -i $stuff/libv4l-0.8.3.patch
Hans-G?nter@24035 33
Hans-G?nter@24035 34 # 1.0.24: no longer needed
slaxemulator@12330 35 # fix https://bugs.archlinux.org/task/26114
Hans-G?nter@24035 36 # patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
Hans-G?nter@24035 37
Hans-G?nter@24035 38 ./configure \
Hans-G?nter@24035 39 --prefix=/usr \
Hans-G?nter@24035 40 --with-docdir=/usr/share/doc/$PACKAGE-$VERSION \
Hans-G?nter@24035 41 --sysconfdir=/etc \
Hans-G?nter@24035 42 --mandir=/usr/share/man \
pascal@1514 43 $CONFIGURE_ARGS &&
pascal@1514 44 make &&
slaxemulator@12330 45 make -j 1 DESTDIR=$DESTDIR install
slaxemulator@8619 46
slaxemulator@8619 47 # copy the missing udev rule
Hans-G?nter@24035 48 [ ! -d $DESTDIR/etc/udev/rules.d ] &&
Hans-G?nter@24035 49 mkdir -p $DESTDIR/etc/udev/rules.d
Hans-G?nter@24035 50 cp -a $src/tools/udev/libsane.rules \
Hans-G?nter@24035 51 $DESTDIR/etc/udev/rules.d/55-sane.rules
pankso@648 52 }
pankso@648 53
pankso@648 54 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@648 55 genpkg_rules()
pankso@648 56 {
Hans-G?nter@24035 57 mkdir -p $fs/etc/sane.d
Hans-G?nter@24035 58 mkdir -p $fs/usr/lib
Hans-G?nter@24035 59 mkdir -p $fs/usr/share
Hans-G?nter@24035 60 mkdir -p $fs/var/lock/sane
Hans-G?nter@24035 61 mkdir -p $fs/var/www/tazpanel/lib
Hans-G?nter@24035 62 mkdir -p $fs/var/www/tazpanel/menu.d/hardware
Hans-G?nter@24035 63 mkdir -p $fs/var/www/tazpanel/report.d
Hans-G?nter@24035 64 mkdir -p $fs/var/www/tazpanel/styles/default/images
Hans-G?nter@24035 65
Hans-G?nter@24035 66 cp -a $install/etc/sane.d $fs/etc
Hans-G?nter@24035 67
Hans-G?nter@24035 68 cp -a $install/usr/bin $fs/usr
Hans-G?nter@24035 69 cp -a $install/usr/sbin $fs/usr
Hans-G?nter@24035 70 cp -a $install/usr/lib/*.so* $fs/usr/lib
Hans-G?nter@24035 71 cp -a $install/usr/lib/sane $fs/usr/lib
Hans-G?nter@24035 72 cp -a $install/usr/share/sane $fs/usr/share
Hans-G?nter@24035 73
Hans-G?nter@24035 74 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/
Hans-G?nter@24035 75 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/
Hans-G?nter@24035 76 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/
Hans-G?nter@24035 77 cp $stuff/tazpanel/drag.gif $fs/var/www/tazpanel/styles/default/images/
Hans-G?nter@24035 78 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane
Hans-G?nter@24035 79
Hans-G?nter@24035 80 # fix groups and permissions on /var/lock/sane ; add it to scanner group
slaxemulator@8619 81 chmod 775 "$fs/var/lock/sane"
slaxemulator@8619 82 chgrp 96 "$fs/var/lock/sane"
jozee@5072 83
slaxemulator@8619 84 # fix hp officejets
slaxemulator@8619 85 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
pankso@648 86 }
jozee@3468 87
jozee@3468 88 post_install()
jozee@3468 89 {
pascal@18730 90 tazpkg reconfigure udev --root="$1"
jozee@5056 91
jozee@3468 92 # add group scanner
Hans-G?nter@24035 93 if ! grep -q scanner "$1/etc/group"
Hans-G?nter@24035 94 then
pascal@18730 95 chroot "$1/" addgroup -g 96 scanner
jozee@4966 96 fi
Hans-G?nter@24035 97
Hans-G?nter@24035 98 chroot "$1/" chgrp scanner /usr/bin/scanimage
Hans-G?nter@24035 99 chmod 4750 $1/usr/bin/scanimage
Hans-G?nter@24035 100
pascal@20319 101 echo
Hans-G?nter@24035 102 echo " ADD user(s) to group scanner to use sane: addgroup <user> scanner"
pascal@18237 103
pascal@18750 104 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null
pascal@18730 105 [ -e "$1/var/www/tazpanel/tmp" ] ||
Hans-G?nter@24035 106 ln -s /tmp "$1/var/www/tazpanel/tmp"
jozee@3468 107 }
jozee@3468 108
jozee@3468 109 post_remove()
jozee@3468 110 {
Hans-G?nter@24035 111 # delete group scanner
slaxemulator@12330 112 chroot "$1/" delgroup scanner & >/dev/null
jozee@3468 113 }