[SCM] Debian packaging of w3c-linkchecker branch, master, updated. upstream/4.81-92-g50cec4c

Nicholas Bamber nicholas at periapt.co.uk
Fri Sep 28 16:27:47 UTC 2012


The following commit has been merged in the master branch:
commit aac8c8a2dc3106d9afcef1df7e8e6eaf78f229c4
Author: Nicholas Bamber <nicholas at periapt.co.uk>
Date:   Fri Sep 28 17:05:42 2012 +0100

    * Applied patch from Hideki Yamane <henrich at debian.org> to comply
      with policy 10.7.3. (Closes: #688736)
      - debian/{postinst,w3c-linkchecker.install}: Not use linkchecker.conf
      as conffile but template file and use ucf for conffile.
      - debian/control: "Depends: ucf"
      - debian/postrm: remove /etc/w3c/checklink.conf on purge and temporary
      files when no longer required.
      - debian/config: removed '-e' from shebang and final 'exit 0'
    * Removed gross irrelevancies from long description

diff --git a/debian/changelog b/debian/changelog
index 962bc67..c6ce6a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+w3c-linkchecker (4.81-5) UNRELEASED; urgency=low
+
+  * Applied patch from Hideki Yamane <henrich at debian.org> to comply
+    with policy 10.7.3. (Closes: #688736)
+    - debian/{postinst,w3c-linkchecker.install}: Not use linkchecker.conf
+    as conffile but template file and use ucf for conffile.
+    - debian/control: "Depends: ucf"
+    - debian/postrm: remove /etc/w3c/checklink.conf on purge and temporary
+    files when no longer required. 
+    - debian/config: removed '-e' from shebang and final 'exit 0'
+  * Removed gross irrelevancies from long description
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk>  Fri, 28 Sep 2012 09:14:07 +0100
+
 w3c-linkchecker (4.81-4) unstable; urgency=low
 
   * Updated Czech translation (Closes: #658398)
diff --git a/debian/config b/debian/config
index 5fbbb59..3380bcf 100755
--- a/debian/config
+++ b/debian/config
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/sh
 
 set -e
 
@@ -9,3 +9,4 @@ db_input low w3c-linkchecker/hostname || true
 db_input low w3c-linkchecker/private_ips || true
 db_go
 
+exit 0
diff --git a/debian/control b/debian/control
index 50f39ff..0c700bc 100644
--- a/debian/control
+++ b/debian/control
@@ -16,11 +16,10 @@ Architecture: all
 Depends: ${misc:Depends}, ${perl:Depends}, libcss-dom-perl,
  libhtml-parser-perl, libwww-perl (>= 5.833), liburi-perl (>= 1.53),
  libconfig-general-perl, libnet-ip-perl, libterm-readkey-perl,
- libencode-locale-perl
+ libencode-locale-perl, ucf
 Recommends: w3c-markup-validator, apache2 | httpd-cgi
 Description: tool to verify the links in a web page are still valid
- This manual page documents briefly the checklink command, a.k.a. the W3C®
- Link Checker. checklink is a program that reads an HTML or XHTML document,
+ The checklink tool is a program that reads an HTML or XHTML document,
  extracts a list of anchors and links and checks that no anchor is defined twice
  and that all the links are dereferenceable, including the fragments. It warns
  about HTTP redirects, including directory redirects, and can check recursively
diff --git a/debian/postinst b/debian/postinst
index 7cba56c..5ac268d 100755
--- a/debian/postinst
+++ b/debian/postinst
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh 
 # postinst script for w3c-linkchecker
 #
 # see: dh_installdeb(1)
@@ -23,12 +23,15 @@ set -e
 case "$1" in
     configure)
 
+        CFG_TEMPLATE=/usr/share/w3c-linkchecker/checklink.conf
+        CFG_TMP=/etc/w3c/checklink.conf.dpkg-new
         CFG_FILE=/etc/w3c/checklink.conf
 
         db_get w3c-linkchecker/hostname
         if [ "$RET" ]
         then
-            sed -i -e "s|^Doc_URI = http://[a-z0-9.]\+/|Doc_URI = http://$RET/|" $CFG_FILE
+            sed -e "s|^Doc_URI = http://[a-z0-9.]\+/|Doc_URI = http://$RET/|" \
+              < $CFG_TEMPLATE > $CFG_TMP
         fi
 
         db_get w3c-linkchecker/private_ips
@@ -39,9 +42,14 @@ case "$1" in
             then
                 VALUE=0
             fi
-            sed -i -e "s|^\(# \)\?Allow_Private_IPs = [01]$|Allow_Private_IPs = $VALUE|" $CFG_FILE
+            sed -e "s|^\(# \)\?Allow_Private_IPs = [01]$|Allow_Private_IPs = $VALUE|" \
+              < $CFG_TEMPLATE > $CFG_TMP
         fi
 
+        ucf --debconf-ok $CFG_TMP $CFG_FILE && rm -f $CFG_TMP
+        db_stop
+
+
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..057d53d
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+set -e
+
+CFG_FILE=/etc/w3c/checklink.conf
+
+case "$1" in
+    purge)
+
+    if which ucf >/dev/null 2>&1; then
+        ucf --purge $CFG_FILE
+    else
+        rm -f $CFG_FILE
+    fi
+
+    for ext in .bak .tmp .dpkg-tmp .dkpg-new .dpkg-old .ucf-new .ucf-old .ucf-dist
+    do
+       rm -f $CFG_FILE$ext
+    done
+
+    ;;
+
+    remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+    ;;
+
+    *)
+        echo "postrm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/w3c-linkchecker.install b/debian/w3c-linkchecker.install
index 2ad118e..5e17d92 100644
--- a/debian/w3c-linkchecker.install
+++ b/debian/w3c-linkchecker.install
@@ -1,5 +1,5 @@
 bin/checklink usr/bin
-etc/checklink.conf etc/w3c/
+etc/checklink.conf usr/share/w3c-linkchecker/
 docs/* usr/share/w3c-linkchecker/docs/
 images/* usr/share/w3c-linkchecker/images/
 debian/apache2-linkchecker.conf etc/w3c/

-- 
Debian packaging of w3c-linkchecker



More information about the Pkg-perl-cvs-commits mailing list