wok-6.x annotate sane-backends/receipt @ rev 12330
sane-backends: Clean up. Add support for libv4l 0.8.3+.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Apr 19 08:51:41 2012 +0000 (2012-04-19) |
parents | 4d40b2bc1125 |
children | 0f924bbd9a0d |
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" |
pankso@648 | 8 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@648 | 9 WEB_SITE="http://www.sane-project.org/" |
slaxemulator@12330 | 10 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL" |
pankso@648 | 11 |
erjo@9948 | 12 DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl" |
slaxemulator@12330 | 13 BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev libgphoto2-dev" |
erjo@9948 | 14 |
pankso@648 | 15 # Rules to configure and make the package. |
pankso@648 | 16 compile_rules() |
pankso@648 | 17 { |
pankso@648 | 18 cd $src |
slaxemulator@12330 | 19 patch -Np1 -i $stuff/libv4l-0.8.3.patch |
slaxemulator@12330 | 20 # fix https://bugs.archlinux.org/task/26114 |
slaxemulator@12330 | 21 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch |
pankso@648 | 22 ./configure \ |
pankso@648 | 23 --prefix=/usr \ |
pankso@648 | 24 --sysconfdir=/etc \ |
pankso@648 | 25 --mandir=/usr/share/man \ |
pascal@1514 | 26 $CONFIGURE_ARGS && |
pascal@1514 | 27 make && |
slaxemulator@12330 | 28 make -j 1 DESTDIR=$DESTDIR install |
slaxemulator@8619 | 29 |
slaxemulator@8619 | 30 # copy the missing udev rule |
slaxemulator@12330 | 31 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d |
slaxemulator@12330 | 32 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules |
pankso@648 | 33 } |
pankso@648 | 34 |
pankso@648 | 35 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@648 | 36 genpkg_rules() |
pankso@648 | 37 { |
slaxemulator@8619 | 38 mkdir -p $fs/usr/lib $fs/usr/share \ |
slaxemulator@8619 | 39 $fs/var/lock/sane $fs/etc/sane.d |
pankso@648 | 40 |
pankso@648 | 41 cp -a $_pkg/etc/sane.d $fs/etc |
pankso@648 | 42 cp -a $_pkg/usr/bin $fs/usr |
pankso@648 | 43 cp -a $_pkg/usr/sbin $fs/usr |
pankso@648 | 44 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
pankso@648 | 45 cp -a $_pkg/usr/lib/sane $fs/usr/lib |
pankso@648 | 46 cp -a $_pkg/usr/share/sane $fs/usr/share |
jozee@3468 | 47 |
jozee@3468 | 48 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
slaxemulator@8619 | 49 chmod 775 "$fs/var/lock/sane" |
slaxemulator@8619 | 50 chgrp 96 "$fs/var/lock/sane" |
jozee@5072 | 51 |
slaxemulator@8619 | 52 # fix hp officejets |
slaxemulator@8619 | 53 echo "hpaio" >> "$fs/etc/sane.d/dll.conf" |
pankso@648 | 54 } |
jozee@3468 | 55 |
jozee@3468 | 56 post_install() |
jozee@3468 | 57 { |
jozee@3468 | 58 local root |
jozee@3468 | 59 root=$1 |
jozee@3468 | 60 |
slaxemulator@12330 | 61 tazpkg reconfigure udev --root=$root |
jozee@5056 | 62 |
jozee@3468 | 63 # add group scanner |
jozee@5052 | 64 if ! grep -q scanner $root/etc/group ; then |
slaxemulator@12330 | 65 chroot "$root/" addgroup -g 96 scanner |
jozee@4966 | 66 fi |
jozee@3468 | 67 |
jozee@3468 | 68 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
jozee@3468 | 69 } |
jozee@3468 | 70 |
jozee@3468 | 71 post_remove() |
jozee@3468 | 72 { |
slaxemulator@12330 | 73 chroot "$1/" delgroup scanner & >/dev/null |
jozee@3468 | 74 } |