wok-next diff sane-backends/receipt @ rev 20512
Tiny edits, patch ptlib
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Mar 17 04:50:25 2018 +0200 (2018-03-17) |
parents | 371d22f12221 |
children | 757d032c55c7 |
line diff
1.1 --- a/sane-backends/receipt Mon Oct 16 12:17:41 2017 +0200 1.2 +++ b/sane-backends/receipt Sat Mar 17 04:50:25 2018 +0200 1.3 @@ -1,23 +1,21 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="sane-backends" 1.8 VERSION="1.0.22" 1.9 CATEGORY="system-tools" 1.10 -SHORT_DESC="Scanner Access Now Easy." 1.11 +SHORT_DESC="Scanner Access Now Easy" 1.12 MAINTAINER="pankso@slitaz.org" 1.13 LICENSE="GPL2" 1.14 +WEB_SITE="http://www.sane-project.org/" 1.15 + 1.16 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.17 -WEB_SITE="http://www.sane-project.org/" 1.18 WGET_URL="ftp://ftp2.sane-project.org/pub/sane/$PACKAGE-$VERSION/$TARBALL" 1.19 1.20 -DEPENDS="libusb-compat jpeg tiff zlib libgphoto2 libv4l libltdl" 1.21 -BUILD_DEPENDS="libusb-compat-dev jpeg-dev tiff-dev zlib-dev libv4l-dev \ 1.22 -libgphoto2-dev libtool udev-dev" 1.23 -SUGGESTED="imagemagick gocr tesseract-ocr" 1.24 +BUILD_DEPENDS="libusb-compat-dev libjpeg-turbo-dev tiff-dev zlib-dev libv4l-dev \ 1.25 +libgphoto2-dev libtool eudev-dev" 1.26 +SPLIT="sane-backends-dev" 1.27 1.28 -# Rules to configure and make the package. 1.29 -compile_rules() 1.30 -{ 1.31 +compile_rules() { 1.32 sed -i 's|prefix}/doc|prefix}/share/doc|' configure 1.33 patch -Np1 -i $stuff/libv4l-0.8.3.patch 1.34 # fix https://bugs.archlinux.org/task/26114 1.35 @@ -28,58 +26,61 @@ 1.36 --mandir=/usr/share/man \ 1.37 $CONFIGURE_ARGS && 1.38 make && 1.39 - make -j 1 DESTDIR=$DESTDIR install 1.40 + make -j 1 DESTDIR=$install install || return 1 1.41 1.42 # copy the missing udev rule 1.43 - [ ! -d $DESTDIR/etc/udev/rules.d ] && mkdir -p $DESTDIR/etc/udev/rules.d 1.44 - cp -a $src/tools/udev/libsane.rules $DESTDIR/etc/udev/rules.d/55-sane.rules 1.45 + mkdir -p $install/etc/udev/rules.d 1.46 + cp $src/tools/udev/libsane.rules $install/etc/udev/rules.d/55-sane.rules 1.47 + 1.48 + # TazPanel stuff 1.49 + mkdir -p \ 1.50 + $install/var/www/tazpanel/lib/ \ 1.51 + $install/var/www/tazpanel/report.d/ \ 1.52 + $install/var/www/tazpanel/menu.d/hardware/ \ 1.53 + $install/var/www/tazpanel/styles/default/images 1.54 + cp $stuff/tazpanel/sane.cgi $install/var/www/tazpanel/ 1.55 + cp $stuff/tazpanel/sane $install/var/www/tazpanel/report.d/ 1.56 + cp $stuff/tazpanel/crop.js $install/var/www/tazpanel/lib/ 1.57 + cp $stuff/tazpanel/drag.gif $install/var/www/tazpanel/styles/default/images/ 1.58 + ln -s ../../sane.cgi $install/var/www/tazpanel/menu.d/hardware/sane 1.59 + 1.60 + # fix groups/permissions on /var/lock/sane ; add it to scanner group 1.61 + chmod 775 "$install/var/lock/sane" 1.62 + chgrp 96 "$install/var/lock/sane" 1.63 + 1.64 + # fix hp officejets 1.65 + echo "hpaio" >> "$install/etc/sane.d/dll.conf" 1.66 } 1.67 1.68 -# Rules to gen a SliTaz package suitable for Tazpkg. 1.69 -genpkg_rules() 1.70 -{ 1.71 - mkdir -p $fs/usr/lib $fs/usr/share \ 1.72 - $fs/var/lock/sane $fs/etc/sane.d \ 1.73 - $fs/var/www/tazpanel/lib \ 1.74 - $fs/var/www/tazpanel/report.d \ 1.75 - $fs/var/www/tazpanel/menu.d/hardware 1.76 - 1.77 - cp -a $install/etc/sane.d $fs/etc 1.78 - cp -a $install/usr/bin $fs/usr 1.79 - cp -a $install/usr/sbin $fs/usr 1.80 - cp -a $install/usr/lib/*.so* $fs/usr/lib 1.81 - cp -a $install/usr/lib/sane $fs/usr/lib 1.82 - cp -a $install/usr/share/sane $fs/usr/share 1.83 - cp $stuff/tazpanel/sane.cgi $fs/var/www/tazpanel/ 1.84 - cp $stuff/tazpanel/sane $fs/var/www/tazpanel/report.d/ 1.85 - cp $stuff/tazpanel/crop.js $fs/var/www/tazpanel/lib/ 1.86 - ln -s ../../sane.cgi $fs/var/www/tazpanel/menu.d/hardware/sane 1.87 - 1.88 - # fix groups/permissions on /var/lock/sane ; add it to scanner group 1.89 - chmod 775 "$fs/var/lock/sane" 1.90 - chgrp 96 "$fs/var/lock/sane" 1.91 - 1.92 - # fix hp officejets 1.93 - echo "hpaio" >> "$fs/etc/sane.d/dll.conf" 1.94 +genpkg_rules() { 1.95 + case $PACKAGE in 1.96 + sane-backends) 1.97 + copy @std 1.98 + DEPENDS="libusb-compat libjpeg-turbo tiff zlib libgphoto2 libv4l libltdl" 1.99 + SUGGESTED="imagemagick gocr tesseract-ocr" 1.100 + ;; 1.101 + *-dev) 1.102 + copy @dev 1.103 + DEPENDS="sane-backends" 1.104 + ;; 1.105 + esac 1.106 } 1.107 1.108 -post_install() 1.109 -{ 1.110 - tazpkg reconfigure udev --root="$1" 1.111 - 1.112 +post_install_sane_backends() { 1.113 + tazpkg reconfigure eudev --root="$1" 1.114 + 1.115 # add group scanner 1.116 if ! grep -q scanner "$1/etc/group" ; then 1.117 chroot "$1/" addgroup -g 96 scanner 1.118 fi 1.119 - 1.120 + 1.121 echo " ADD yourself to group scanner to use sane: addgroup tux scanner" 1.122 - 1.123 - rm -f "$1"/var/cache/tazpanel/* 2> /dev/null 1.124 + 1.125 + rm -f "$1"/var/cache/tazpanel/* 2>/dev/null 1.126 [ -e "$1/var/www/tazpanel/tmp" ] || 1.127 ln -s /tmp "$1/var/www/tazpanel/tmp" 1.128 } 1.129 1.130 -post_remove() 1.131 -{ 1.132 +post_remove_sane_backends() { 1.133 chroot "$1/" delgroup scanner & >/dev/null 1.134 }