Control: tags -1 + patch

Attached is a patch for your package that fails to install on jessie.
diff -Nru w3c-markup-validator-1.3+dfsg/debian/postinst w3c-markup-validator-1.3+dfsg/debian/postinst
--- w3c-markup-validator-1.3+dfsg/debian/postinst	2012-10-04 00:48:48.000000000 +0200
+++ w3c-markup-validator-1.3+dfsg/debian/postinst	2013-08-05 13:20:09.000000000 +0200
@@ -24,9 +24,7 @@
 #     `abort-remove' or `abort-deconfigure'.
 
 case "$1" in
-    configure|reconfigure)
-
-        server="apache2"
+    configure)
 
         # Old versions stored config files here
         # We won't delete the old config file in case there are
@@ -37,33 +35,19 @@
                 rm /etc/$old/w3c-markup-validator.conf
             fi
         done
+	rm -f /etc/apache2/conf.d/w3c-markup-validator.conf
 
-	if [ ! -s /etc/$server/conf.d/w3c-markup-validator.conf ]; then
-	    ln -s /etc/w3c/httpd.conf   \
-                    /etc/$server/conf.d/w3c-markup-validator.conf
-        fi
-
-        if [ $server = "apache2" ]; then
-
-            if [ ! -s /etc/$server/mods-enabled/include.load ]; then
-                a2enmod include
+        if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+            . /usr/share/apache2/apache2-maintscript-helper
+            if ! a2query -qm include ; then
+                apache2_invoke enmod include || exit $?
             fi
-
-            if [ ! -s /etc/$server/mods-enabled/rewrite.load ]; then
-                a2enmod rewrite
+            if ! a2query -qm rewrite ; then
+                apache2_invoke enmod rewrite || exit $?
             fi
-	    
-	fi
-
-	if [ -x "/etc/init.d/$server" ]; then
-		if [ -x /usr/sbin/invoke-rc.d ]; then
-			invoke-rc.d $server restart || true
-		else
-			/etc/init.d/$server restart || true
-		fi
-	fi
-	sleep 2
-
+            apache2_invoke enconf w3c-markup-validator || exit $?
+        fi
+        
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff -Nru w3c-markup-validator-1.3+dfsg/debian/postrm w3c-markup-validator-1.3+dfsg/debian/postrm
--- w3c-markup-validator-1.3+dfsg/debian/postrm	2012-10-04 00:48:48.000000000 +0200
+++ w3c-markup-validator-1.3+dfsg/debian/postrm	2013-08-05 13:24:55.000000000 +0200
@@ -24,6 +24,10 @@
         ;;
 
 	purge)
+            if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+                . /usr/share/apache2/apache2-maintscript-helper
+                apache2_invoke disconf w3c-markup-validator || exit $?
+            fi
 	    rmdir /etc/w3c 2>/dev/null || true
 	;;
 
diff -Nru w3c-markup-validator-1.3+dfsg/debian/prerm w3c-markup-validator-1.3+dfsg/debian/prerm
--- w3c-markup-validator-1.3+dfsg/debian/prerm	2012-10-04 00:48:48.000000000 +0200
+++ w3c-markup-validator-1.3+dfsg/debian/prerm	2013-08-05 13:20:25.000000000 +0200
@@ -17,34 +17,10 @@
 # the debian-policy package
 
 
-case "$1" in
-    upgrade)
-	;;
-    remove|deconfigure)
-
-        server="apache2"
-
-	if [ -s /etc/$server/conf.d/w3c-markup-validator.conf ]; then
-	    rm /etc/$server/conf.d/w3c-markup-validator.conf 
-	fi
-
-	if [ -x "/etc/init.d/$server" ]; then
-		if [ -x /usr/sbin/invoke-rc.d ]; then
-			invoke-rc.d $server restart || true
-		else
-			/etc/init.d/$server restart || true
-		fi
-	fi
-	sleep 2
-
-        ;;
-    failed-upgrade)
-        ;;
-    *)
-        echo "prerm called with unknown argument \`$1'" >&2
-        exit 1
-    ;;
-esac
+if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
+    . /usr/share/apache2/apache2-maintscript-helper
+    apache2_invoke disconf w3c-markup-validator || exit $?
+fi
 
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.
diff -Nru w3c-markup-validator-1.3+dfsg/debian/rules w3c-markup-validator-1.3+dfsg/debian/rules
--- w3c-markup-validator-1.3+dfsg/debian/rules	2013-03-15 09:01:28.000000000 +0100
+++ w3c-markup-validator-1.3+dfsg/debian/rules	2013-08-05 13:16:38.000000000 +0200
@@ -23,6 +23,7 @@
 	dh_install share/templates/en_US/*       ${SHARED_DIR}/templates/en_US
 	dh_install -Xconfig -Xtest htdocs/*      ${HTML_DIR}
 	dh_install debian/logo.png               ${IMAGES_DIR}
+	dh_link ${CONFIG_DIR}/httpd.conf /etc/apache2/conf-available/w3c-markup-validator.conf
 
 override_dh_installdocs:
 	mkdir -p debian/tmp

Reply via email to