Added debian/*.preinst to remove old package doc dir before installing
authorأحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@sabily.org>
Mon, 1 Oct 2012 18:13:59 +0000 (20:13 +0200)
committerأحمد المحمودي (Ahmed El-Mahmoudy) <aelmahmoudy@sabily.org>
Mon, 1 Oct 2012 18:13:59 +0000 (20:13 +0200)
respective package.

Closes: #685653, #688603, #688604, #688605, #688606

debian/mlterm-im-ibus.preinst [new file with mode: 0644]
debian/mlterm-im-m17nlib.preinst [new file with mode: 0644]
debian/mlterm-im-scim.preinst [new file with mode: 0644]
debian/mlterm-im-uim.preinst [new file with mode: 0644]
debian/mlterm-tiny.preinst [new file with mode: 0644]
debian/mlterm-tools.preinst [new file with mode: 0644]
debian/mlterm.preinst [new file with mode: 0644]

diff --git a/debian/mlterm-im-ibus.preinst b/debian/mlterm-im-ibus.preinst
new file mode 100644 (file)
index 0000000..f0ad78d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        # dpkg does not replace directories by symlinks or vice versa.
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm-im-ibus || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mlterm-im-m17nlib.preinst b/debian/mlterm-im-m17nlib.preinst
new file mode 100644 (file)
index 0000000..fa7d170
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        # dpkg does not replace directories by symlinks or vice versa.
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm-im-m17nlib || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mlterm-im-scim.preinst b/debian/mlterm-im-scim.preinst
new file mode 100644 (file)
index 0000000..0303435
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        # dpkg does not replace directories by symlinks or vice versa.
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm-im-scim || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mlterm-im-uim.preinst b/debian/mlterm-im-uim.preinst
new file mode 100644 (file)
index 0000000..1b579d8
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        # dpkg does not replace directories by symlinks or vice versa.
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm-im-uim || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mlterm-tiny.preinst b/debian/mlterm-tiny.preinst
new file mode 100644 (file)
index 0000000..a71b15c
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm-tiny || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mlterm-tools.preinst b/debian/mlterm-tools.preinst
new file mode 100644 (file)
index 0000000..fefaa2b
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        # dpkg does not replace directories by symlinks or vice versa.
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm-tools || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/mlterm.preinst b/debian/mlterm.preinst
new file mode 100644 (file)
index 0000000..b2404b6
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+    install|upgrade)
+        if dpkg --compare-versions "$2" lt "3.1.2-1.1" ; then
+          rm -rf /usr/share/doc/mlterm || true
+        fi
+    ;;
+
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0