[pkg-horde] [SCM] Debian Horde Packages repository: horde3 package branch, debian-sid, updated. b510ebaff7ba7113089fdd2035992e977cc92df1

Mathieu Parent math.parent at gmail.com
Sun Dec 20 15:08:21 UTC 2009


The following commit has been merged in the debian-sid branch:
commit b510ebaff7ba7113089fdd2035992e977cc92df1
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Sun Dec 20 16:08:04 2009 +0100

    Replace config symlink by update-alternatives
    
    to allow configuration packages

diff --git a/debian/changelog b/debian/changelog
index 48436c7..4c52fdf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ horde3 (3.3.6-1) UNRELEASED; urgency=low
 
   * New upstream release.
   * Change my email address, as I am now Debian developer
+  * Replace config symlink by update-alternatives to allow configuration
+    packages
 
  -- Mathieu Parent <sathieu at debian.org>  Sun, 20 Dec 2009 15:29:09 +0100
 
diff --git a/debian/horde3.postinst b/debian/horde3.postinst
index 72ecf8a..9eaf630 100644
--- a/debian/horde3.postinst
+++ b/debian/horde3.postinst
@@ -25,6 +25,8 @@ case "$1" in
     chgrp www-data /etc/horde
     chmod 750 /etc/horde
 
+    update-alternatives --install /usr/share/horde3/config horde3-config /etc/horde/horde3 1
+    
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/debian/horde3.prerm b/debian/horde3.prerm
new file mode 100644
index 0000000..543623e
--- /dev/null
+++ b/debian/horde3.prerm
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+    remove)
+        update-alternatives --remove horde3-config /etc/horde/horde3
+    ;;
+
+    upgrade|deconfigure|failed-upgrade)
+    ;;
+
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/rules b/debian/rules
index eabdf1b..424faaa 100755
--- a/debian/rules
+++ b/debian/rules
@@ -89,9 +89,8 @@ install: build
 	cat config/conf.xml | \
 		sed -e "109,116s@/horde@/horde3@" > debian/horde3/etc/horde/horde3/conf.xml
 
-	#### horde expects configuration in config subdir, create a symlink
-        #### to comply with FHS
-	dh_link etc/horde/horde3 usr/share/horde3/config
+	#### horde expects configuration in config subdir, an update-alternatives
+	#### symlink is created in maintainer's script to comply with FHS
 
 	#### copy scripts to run by cron ####
 	mkdir -p debian/horde3/usr/share/horde3/scripts

-- 
Debian Horde Packages repository: horde3 package



More information about the pkg-horde-hackers mailing list