wok-current annotate sane-backends/receipt @ rev 23611
updated re2c (1.2.1 -> 1.3)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Apr 14 06:45:07 2020 +0100 (2020-04-14) |
parents | 19ad77dc1d71 |
children | 1b5e36efea1d |
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@20172 | 45 $fs/var/www/tazpanel/menu.d/hardware \ |
pascal@20172 | 46 $fs/var/www/tazpanel/styles/default/images |
pankso@648 | 47 |
pascal@15000 | 48 cp -a $install/etc/sane.d $fs/etc |
pascal@15000 | 49 cp -a $install/usr/bin $fs/usr |
pascal@15000 | 50 cp -a $install/usr/sbin $fs/usr |
pascal@15000 | 51 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pascal@15000 | 52 cp -a $install/usr/lib/sane $fs/usr/lib |
pascal@15000 | 53 cp -a $install/usr/share/sane $fs/usr/share |
pascal@18237 | 54 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/ |
pascal@18242 | 55 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/ |
pascal@18237 | 56 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/ |
pascal@20172 | 57 cp $stuff/tazpanel/drag.gif $fs/var/www/tazpanel/styles/default/images/ |
pascal@18237 | 58 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane |
jozee@3468 | 59 |
jozee@3468 | 60 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
slaxemulator@8619 | 61 chmod 775 "$fs/var/lock/sane" |
slaxemulator@8619 | 62 chgrp 96 "$fs/var/lock/sane" |
jozee@5072 | 63 |
slaxemulator@8619 | 64 # fix hp officejets |
slaxemulator@8619 | 65 echo "hpaio" >> "$fs/etc/sane.d/dll.conf" |
pankso@648 | 66 } |
jozee@3468 | 67 |
jozee@3468 | 68 post_install() |
jozee@3468 | 69 { |
pascal@18730 | 70 tazpkg reconfigure udev --root="$1" |
jozee@5056 | 71 |
jozee@3468 | 72 # add group scanner |
pascal@18730 | 73 if ! grep -q scanner "$1/etc/group" ; then |
pascal@18730 | 74 chroot "$1/" addgroup -g 96 scanner |
jozee@4966 | 75 fi |
pascal@20300 | 76 chroot "$1/" chgrp scanner /usr/bin/scanimage |
pascal@20299 | 77 chmod 4750 $1/usr/bin/scanimage |
jozee@3468 | 78 |
pascal@20319 | 79 echo |
jozee@3468 | 80 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
pascal@18237 | 81 |
pascal@18750 | 82 rm -f "$1"/var/cache/tazpanel/* 2> /dev/null |
pascal@18730 | 83 [ -e "$1/var/www/tazpanel/tmp" ] || |
pascal@18730 | 84 ln -s /tmp "$1/var/www/tazpanel/tmp" |
jozee@3468 | 85 } |
jozee@3468 | 86 |
jozee@3468 | 87 post_remove() |
jozee@3468 | 88 { |
slaxemulator@12330 | 89 chroot "$1/" delgroup scanner & >/dev/null |
jozee@3468 | 90 } |