diff options
Diffstat (limited to 'debian')
| -rw-r--r-- | debian/changelog | 5 | ||||
| -rw-r--r-- | debian/patches/0005-mk_reproducible_results.patch | 17 | ||||
| -rw-r--r-- | debian/patches/series | 1 | ||||
| -rwxr-xr-x | debian/rules | 3 | ||||
| -rw-r--r-- | debian/sane-utils.postinst | 23 | ||||
| -rw-r--r-- | debian/sane-utils.postrm | 23 | 
6 files changed, 67 insertions, 5 deletions
| diff --git a/debian/changelog b/debian/changelog index 8040079..3a50a60 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,8 +18,13 @@ sane-backends (1.0.24-10) UNRELEASED; urgency=medium        + libsane-dbg: libsane-extras-dbg (<< 1.0.18.14)    * debian/rules:      - Enable pnm backend for testing. +    - Remove override_dh_builddeb because compression xz is now standard.    * debian/saned@.service:      - Remove Alias from [Install] Section (Closes: #778268). +  * sane-utils.[postinst|postrm]: +    + Replace fixed path with a POSIX-compliant shell function to check +      the existence of a command. +   -- Jörg Frings-Fürst <debian@jff-webhosting.net>  Sun, 18 Jan 2015 11:46:18 +0100 diff --git a/debian/patches/0005-mk_reproducible_results.patch b/debian/patches/0005-mk_reproducible_results.patch new file mode 100644 index 0000000..0906d6d --- /dev/null +++ b/debian/patches/0005-mk_reproducible_results.patch @@ -0,0 +1,17 @@ +Index: trunk/tools/sane-desc.c +=================================================================== +--- trunk.orig/tools/sane-desc.c ++++ trunk/tools/sane-desc.c +@@ -2816,8 +2816,10 @@ html_print_footer (void) +      "<address>\n" +      "<a href=\"http://www.sane-project.org/imprint.html\"\n" +      ">Contact</a>\n" "</address>\n" "<font size=-1>\n"); +-  printf ("This page was last updated on %s by sane-desc %s from %s\n", +-	  asctime (localtime (¤t_time)), SANE_DESC_VERSION, PACKAGE_STRING); ++/*  printf ("This page was last updated on %s by sane-desc %s from %s\n", ++	  asctime (localtime (¤t_time)), SANE_DESC_VERSION, PACKAGE_STRING); */ ++  printf ("This page was last updated by sane-desc %s from %s\n", ++	  SANE_DESC_VERSION, PACKAGE_STRING); +   printf ("</font>\n"); +   printf ("</body> </html>\n"); + } diff --git a/debian/patches/series b/debian/patches/series index fbfd015..c3b722b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +0005-mk_reproducible_results.patch  hp3900.patch  typo.patch  license_typo.patch diff --git a/debian/rules b/debian/rules index cda6224..bd70cb7 100755 --- a/debian/rules +++ b/debian/rules @@ -136,9 +136,6 @@ override_dh_systemd_enable:  override_dh_strip:  	dh_strip --dbg-package=libsane-dbg -override_dh_builddeb: -	dh_builddeb -- -Zxz -  override_dh_makeshlibs:  	dpkg-gensymbols -v$(VERSION) -plibsane  	dh_makeshlibs diff --git a/debian/sane-utils.postinst b/debian/sane-utils.postinst index 83857a6..f3e5f2d 100644 --- a/debian/sane-utils.postinst +++ b/debian/sane-utils.postinst @@ -8,6 +8,26 @@ saned_eh () {      echo "saned couldn't start; check your inetd configuration and README.Debian"  } +# +# POSIX-compliant shell function +# to check for the existence of a command +# Return 0 if found +# +pathfind() { +    OLDIFS="$IFS" +    IFS=: +    for p in $PATH; do +        if [ -x "$p/$*" ]; then +            IFS="$OLDIFS" +            return 0 +        fi +    done +    IFS="$OLDIFS" +    return 1 +} + + +  if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then      db_get sane-utils/saned_run      RUN_SANED="$RET" @@ -16,7 +36,8 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then      SANED_IN_SCANNER="$RET"      # Add saned service, disabled by default -    if [ -x /usr/sbin/update-inetd ]; then +    pathfind update-inetd +    if [ $? = 0 ]; then  	update-inetd --add "#<off># sane-port\tstream\ttcp\tnowait\tsaned:saned\t/usr/sbin/saned saned"      fi diff --git a/debian/sane-utils.postrm b/debian/sane-utils.postrm index a11d248..4960234 100644 --- a/debian/sane-utils.postrm +++ b/debian/sane-utils.postrm @@ -2,8 +2,29 @@  set -e +# +# POSIX-compliant shell function +# to check for the existence of a command +# Return 0 if found +# +pathfind() { +    OLDIFS="$IFS" +    IFS=: +    for p in $PATH; do +        if [ -x "$p/$*" ]; then +            IFS="$OLDIFS" +            return 0 +        fi +    done +    IFS="$OLDIFS" +    return 1 +} + + +  if [ "$1" = purge ]; then -    if [ -x /usr/sbin/update-inetd ]; then +    pathfind update-inetd +    if [ $? = 0 ]; then  	update-inetd --remove sane-port  	update-inetd --remove "#<off># sane-port"      fi | 
