wok-next view sane-backends/receipt @ rev 20904

libgdata: update bdeps
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jul 30 23:44:42 2018 +0300 (2018-07-30)
parents d6378d455338
children d5aab818505e
line source
1 # SliTaz package receipt v2.
3 PACKAGE="sane-backends"
4 VERSION="1.0.22"
5 CATEGORY="system-tools"
6 SHORT_DESC="Scanner Access Now Easy"
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.sane-project.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
14 BUILD_DEPENDS="libusb-compat-dev libjpeg-turbo-dev tiff-dev zlib-dev v4l-utils-dev \
15 libgphoto2-dev libtool eudev-dev"
16 SPLIT="sane-backends-dev"
18 compile_rules() {
19 sed -i 's|prefix}/doc|prefix}/share/doc|' configure
21 ./configure $CONFIGURE_ARGS &&
22 fix libtool &&
23 make &&
24 make -j1 DESTDIR=$install install || return 1
26 # copy the missing udev rule
27 mkdir -p $install/etc/udev/rules.d
28 cp $src/tools/udev/libsane.rules $install/etc/udev/rules.d/55-sane.rules
30 # TazPanel stuff
31 mkdir -p \
32 $install/var/lock/sane \
33 $install/var/www/tazpanel/lib/ \
34 $install/var/www/tazpanel/report.d/ \
35 $install/var/www/tazpanel/menu.d/hardware/ \
36 $install/var/www/tazpanel/styles/default/images
37 cp $stuff/tazpanel/sane.cgi $install/var/www/tazpanel/
38 cp $stuff/tazpanel/sane $install/var/www/tazpanel/report.d/
39 cp $stuff/tazpanel/crop.js $install/var/www/tazpanel/lib/
40 cp $stuff/tazpanel/drag.gif $install/var/www/tazpanel/styles/default/images/
41 ln -s ../../sane.cgi $install/var/www/tazpanel/menu.d/hardware/sane
43 # fix groups/permissions on /var/lock/sane ; add it to scanner group
44 chmod 775 "$install/var/lock/sane"
45 chgrp 96 "$install/var/lock/sane"
47 # fix hp officejets
48 echo "hpaio" >> "$install/etc/sane.d/dll.conf"
49 }
51 genpkg_rules() {
52 case $PACKAGE in
53 sane-backends)
54 copy @std
55 DEPENDS="libusb-compat libjpeg-turbo tiff zlib libgphoto2 v4l-utils libltdl"
56 SUGGESTED="imagemagick gocr tesseract-ocr"
57 ;;
58 *-dev)
59 copy @dev
60 DEPENDS="sane-backends"
61 ;;
62 esac
63 }
65 post_install_sane_backends() {
66 tazpkg reconfigure eudev --root="$1"
68 # add group scanner
69 if ! grep -q scanner "$1/etc/group" ; then
70 chroot "$1/" addgroup -g 96 scanner
71 fi
72 chroot "$1/" chgrp scanner /usr/bin/scanimage
73 chmod 4750 $1/usr/bin/scanimage
75 echo " ADD yourself to group scanner to use sane: addgroup tux scanner"
77 rm -f "$1"/var/cache/tazpanel/* 2>/dev/null
78 [ -e "$1/var/www/tazpanel/tmp" ] ||
79 ln -s /tmp "$1/var/www/tazpanel/tmp"
80 }
82 post_remove_sane_backends() {
83 chroot "$1/" delgroup scanner >/dev/null
84 }