wok view sane-backends/receipt @ rev 19318
clisp: patch to disable failed test
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jul 13 14:34:07 2016 +0300 (2016-07-13) |
parents | d2c4737a0c7a |
children | caed28d90319 |
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.sane-project.org/"
11 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL"
13 DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl"
14 BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \
15 libgphoto2-dev libtool"
16 SUGGESTED="imagemagick gocr tesseract-ocr"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 sed -i 's|prefix}/doc|prefix}/share/doc|' configure
22 patch -Np1 -i $stuff/libv4l-0.8.3.patch
23 # fix https://bugs.archlinux.org/task/26114
24 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch
25 ./configure \
26 --prefix=/usr \
27 --sysconfdir=/etc \
28 --mandir=/usr/share/man \
29 $CONFIGURE_ARGS &&
30 make &&
31 make -j 1 DESTDIR=$DESTDIR install
33 # copy the missing udev rule
34 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d
35 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/lib $fs/usr/share \
42 $fs/var/lock/sane $fs/etc/sane.d \
43 $fs/var/www/tazpanel/lib \
44 $fs/var/www/tazpanel/report.d \
45 $fs/var/www/tazpanel/menu.d/hardware
47 cp -a $install/etc/sane.d $fs/etc
48 cp -a $install/usr/bin $fs/usr
49 cp -a $install/usr/sbin $fs/usr
50 cp -a $install/usr/lib/*.so* $fs/usr/lib
51 cp -a $install/usr/lib/sane $fs/usr/lib
52 cp -a $install/usr/share/sane $fs/usr/share
53 cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/
54 cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/
55 cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/
56 ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane
58 # fix groups/permissions on /var/lock/sane ; add it to scanner group
59 chmod 775 "$fs/var/lock/sane"
60 chgrp 96 "$fs/var/lock/sane"
62 # fix hp officejets
63 echo "hpaio" >> "$fs/etc/sane.d/dll.conf"
64 }
66 post_install()
67 {
68 tazpkg reconfigure udev --root="$1"
70 # add group scanner
71 if ! grep -q scanner "$1/etc/group" ; then
72 chroot "$1/" addgroup -g 96 scanner
73 fi
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()
83 {
84 chroot "$1/" delgroup scanner & >/dev/null
85 }