]> git.deb.at Git - pkg/abook.git/commitdiff
Rename postinst and postrm files into abook.*
authorDenis Briand <debian@denis-briand.fr>
Wed, 30 Dec 2015 01:56:25 +0000 (02:56 +0100)
committerDenis Briand <debian@denis-briand.fr>
Wed, 30 Dec 2015 01:56:25 +0000 (02:56 +0100)
debian/abook.postinst [new file with mode: 0644]
debian/abook.postrm [new file with mode: 0644]
debian/changelog
debian/postinst [deleted file]
debian/postrm [deleted file]

diff --git a/debian/abook.postinst b/debian/abook.postinst
new file mode 100644 (file)
index 0000000..08ca090
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/sh
+# postinst for abook
+# copyright 2003-2012 by Gerfried Fuchs <rhonda@debian.org>
+# Licenced under WTFPLv2
+
+set -e
+
+# Source debconf library.
+if [ -e /usr/share/debconf/confmodule ]; then
+       . /usr/share/debconf/confmodule
+fi
+
+action=$1
+if [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
+       # workaround until reconfigure is really available
+       action=reconfigure
+fi
+version=$2
+
+# if we got reinstalled after a remove, enable the config snippet again
+if [ "$action" = 'configure' ] && [ -e /etc/Muttrc.d/abook.rc.removed ] && [ ! -e /etc/Muttrc.d/abook.rc ]; then
+       mv /etc/Muttrc.d/abook.rc.removed /etc/Muttrc.d/abook.rc || true
+fi
+
+# fix for #394532 breakage
+if grep "abook --mutt-query '%s'" /etc/Muttrc.d/abook.rc >/dev/null 2>/dev/null ; then
+       sed -i "s/abook --mutt-query '%s'/abook --mutt-query %s/" /etc/Muttrc.d/abook.rc
+fi
+
+# only on new install, upgrade from < 0.5.6 or reconfigure
+if dpkg --compare-versions "$version" lt "0.5.6" || [ "$action" = "reconfigure" ]; then
+       mutt=true
+       if [ -e /usr/share/debconf/confmodule ]; then
+               db_get abook/muttrc.d
+               mutt="$RET"
+       fi
+
+       case "$mutt" in
+           true)
+               if [ ! -e /etc/Muttrc.d/abook.rc ] ; then
+                       mkdir /etc/Muttrc.d 2> /dev/null || true
+                       cat > /etc/Muttrc.d/abook.rc << EOF
+set query_command="abook --mutt-query %s"
+macro pager A |'abook --add-email'\n
+EOF
+               fi
+               ;;
+           false)
+               rm /etc/Muttrc.d/abook.rc 2> /dev/null || true
+               rmdir /etc/Muttrc.d 2> /dev/null || true
+               ;;
+       esac
+fi
+
+
+# menu entry
+if [ "$action" = 'configure' ] && [ -x "`which update-menus`" ]; then
+       update-menus
+fi
+
+#DEBHELPER#
diff --git a/debian/abook.postrm b/debian/abook.postrm
new file mode 100644 (file)
index 0000000..fece21f
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+# postrm for abook
+# copyright 2003-2012 by Gerfried Fuchs <rhonda@debian.org>
+# Licenced under WTFPLv2
+
+set -e
+
+if [ -x "`which update-menus 2>/dev/null`" ]; then
+       update-menus
+fi
+
+action=$1
+
+case "$action" in
+    remove)
+       if [ ! -e /etc/Muttrc.d/abook.rc.removed ]; then
+               # only disable the config snippet
+               mv /etc/Muttrc.d/abook.rc /etc/Muttrc.d/abook.rc.removed || true
+       fi
+       ;;
+    purge)
+       rm /etc/Muttrc.d/abook.rc.removed 2> /dev/null || true
+       rm /etc/Muttrc.d/abook.rc 2> /dev/null || true
+       rmdir /etc/Muttrc.d 2> /dev/null || true
+       # remove debconf data on purge
+       if [ -e /usr/share/debconf/confmodule ]; then
+               . /usr/share/debconf/confmodule
+               db_purge
+       fi
+       ;;
+esac
+
+#DEBHELPER#
index 69ac650ddcb92c4e62126bf450cc94d7b8dd1eec..6a67b6bce0cea6d964889d47d17fb1bbd0a7eed6 100644 (file)
@@ -11,6 +11,7 @@ abook (0.6.1-1) unstable; urgency=medium
   * Remove merged patch 03_datafile-f-switch.  
   * Provide debugging symbols with a new abook-dbg binary package. 
   * Add debhelper token into maintainers scripts. 
+  * Rename postinst and postrm files into abook.* 
 
  -- Rhonda D'Vine <rhonda@debian.org>  Fri, 14 Aug 2015 11:34:47 +0200
 
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644 (file)
index 08ca090..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-# postinst for abook
-# copyright 2003-2012 by Gerfried Fuchs <rhonda@debian.org>
-# Licenced under WTFPLv2
-
-set -e
-
-# Source debconf library.
-if [ -e /usr/share/debconf/confmodule ]; then
-       . /usr/share/debconf/confmodule
-fi
-
-action=$1
-if [ "${DEBCONF_RECONFIGURE}" = "1" ]; then
-       # workaround until reconfigure is really available
-       action=reconfigure
-fi
-version=$2
-
-# if we got reinstalled after a remove, enable the config snippet again
-if [ "$action" = 'configure' ] && [ -e /etc/Muttrc.d/abook.rc.removed ] && [ ! -e /etc/Muttrc.d/abook.rc ]; then
-       mv /etc/Muttrc.d/abook.rc.removed /etc/Muttrc.d/abook.rc || true
-fi
-
-# fix for #394532 breakage
-if grep "abook --mutt-query '%s'" /etc/Muttrc.d/abook.rc >/dev/null 2>/dev/null ; then
-       sed -i "s/abook --mutt-query '%s'/abook --mutt-query %s/" /etc/Muttrc.d/abook.rc
-fi
-
-# only on new install, upgrade from < 0.5.6 or reconfigure
-if dpkg --compare-versions "$version" lt "0.5.6" || [ "$action" = "reconfigure" ]; then
-       mutt=true
-       if [ -e /usr/share/debconf/confmodule ]; then
-               db_get abook/muttrc.d
-               mutt="$RET"
-       fi
-
-       case "$mutt" in
-           true)
-               if [ ! -e /etc/Muttrc.d/abook.rc ] ; then
-                       mkdir /etc/Muttrc.d 2> /dev/null || true
-                       cat > /etc/Muttrc.d/abook.rc << EOF
-set query_command="abook --mutt-query %s"
-macro pager A |'abook --add-email'\n
-EOF
-               fi
-               ;;
-           false)
-               rm /etc/Muttrc.d/abook.rc 2> /dev/null || true
-               rmdir /etc/Muttrc.d 2> /dev/null || true
-               ;;
-       esac
-fi
-
-
-# menu entry
-if [ "$action" = 'configure' ] && [ -x "`which update-menus`" ]; then
-       update-menus
-fi
-
-#DEBHELPER#
diff --git a/debian/postrm b/debian/postrm
deleted file mode 100644 (file)
index fece21f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-# postrm for abook
-# copyright 2003-2012 by Gerfried Fuchs <rhonda@debian.org>
-# Licenced under WTFPLv2
-
-set -e
-
-if [ -x "`which update-menus 2>/dev/null`" ]; then
-       update-menus
-fi
-
-action=$1
-
-case "$action" in
-    remove)
-       if [ ! -e /etc/Muttrc.d/abook.rc.removed ]; then
-               # only disable the config snippet
-               mv /etc/Muttrc.d/abook.rc /etc/Muttrc.d/abook.rc.removed || true
-       fi
-       ;;
-    purge)
-       rm /etc/Muttrc.d/abook.rc.removed 2> /dev/null || true
-       rm /etc/Muttrc.d/abook.rc 2> /dev/null || true
-       rmdir /etc/Muttrc.d 2> /dev/null || true
-       # remove debconf data on purge
-       if [ -e /usr/share/debconf/confmodule ]; then
-               . /usr/share/debconf/confmodule
-               db_purge
-       fi
-       ;;
-esac
-
-#DEBHELPER#