wok-next annotate sane-backends/receipt @ rev 16229
fpc-bootstrap: prepare multi arch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Apr 01 08:34:15 2014 +0000 (2014-04-01) |
parents | 0f924bbd9a0d |
children | 140c18f428f0 |
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" |
erjo@9948 | 16 |
pankso@648 | 17 # Rules to configure and make the package. |
pankso@648 | 18 compile_rules() |
pankso@648 | 19 { |
pankso@648 | 20 cd $src |
slaxemulator@12330 | 21 patch -Np1 -i $stuff/libv4l-0.8.3.patch |
slaxemulator@12330 | 22 # fix https://bugs.archlinux.org/task/26114 |
slaxemulator@12330 | 23 patch -Np1 -i $stuff/xerox_mfp_fix_usb_devices.patch |
pankso@648 | 24 ./configure \ |
pankso@648 | 25 --prefix=/usr \ |
pankso@648 | 26 --sysconfdir=/etc \ |
pankso@648 | 27 --mandir=/usr/share/man \ |
pascal@1514 | 28 $CONFIGURE_ARGS && |
pascal@1514 | 29 make && |
slaxemulator@12330 | 30 make -j 1 DESTDIR=$DESTDIR install |
slaxemulator@8619 | 31 |
slaxemulator@8619 | 32 # copy the missing udev rule |
slaxemulator@12330 | 33 [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d |
slaxemulator@12330 | 34 cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules |
pankso@648 | 35 } |
pankso@648 | 36 |
pankso@648 | 37 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@648 | 38 genpkg_rules() |
pankso@648 | 39 { |
slaxemulator@8619 | 40 mkdir -p $fs/usr/lib $fs/usr/share \ |
slaxemulator@8619 | 41 $fs/var/lock/sane $fs/etc/sane.d |
pankso@648 | 42 |
pascal@15000 | 43 cp -a $install/etc/sane.d $fs/etc |
pascal@15000 | 44 cp -a $install/usr/bin $fs/usr |
pascal@15000 | 45 cp -a $install/usr/sbin $fs/usr |
pascal@15000 | 46 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pascal@15000 | 47 cp -a $install/usr/lib/sane $fs/usr/lib |
pascal@15000 | 48 cp -a $install/usr/share/sane $fs/usr/share |
jozee@3468 | 49 |
jozee@3468 | 50 # fix groups/permissions on /var/lock/sane ; add it to scanner group |
slaxemulator@8619 | 51 chmod 775 "$fs/var/lock/sane" |
slaxemulator@8619 | 52 chgrp 96 "$fs/var/lock/sane" |
jozee@5072 | 53 |
slaxemulator@8619 | 54 # fix hp officejets |
slaxemulator@8619 | 55 echo "hpaio" >> "$fs/etc/sane.d/dll.conf" |
pankso@648 | 56 } |
jozee@3468 | 57 |
jozee@3468 | 58 post_install() |
jozee@3468 | 59 { |
jozee@3468 | 60 local root |
jozee@3468 | 61 root=$1 |
jozee@3468 | 62 |
slaxemulator@12330 | 63 tazpkg reconfigure udev --root=$root |
jozee@5056 | 64 |
jozee@3468 | 65 # add group scanner |
jozee@5052 | 66 if ! grep -q scanner $root/etc/group ; then |
slaxemulator@12330 | 67 chroot "$root/" addgroup -g 96 scanner |
jozee@4966 | 68 fi |
jozee@3468 | 69 |
jozee@3468 | 70 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" |
jozee@3468 | 71 } |
jozee@3468 | 72 |
jozee@3468 | 73 post_remove() |
jozee@3468 | 74 { |
slaxemulator@12330 | 75 chroot "$1/" delgroup scanner & >/dev/null |
jozee@3468 | 76 } |