[Pkg-octave-commit] [SCM] Debian packaging for octave branch, master, updated. 3.2.2-2-102-g2b393c2

Thomas Weber tweber at debian.org
Wed Dec 7 17:56:20 UTC 2011


The following commit has been merged in the master branch:
commit 12cc7c14370d8c2ddac0dd8a107ba3415ac8fdb0
Author: Thomas Weber <tweber at debian.org>
Date:   Tue Nov 15 23:26:24 2011 +0100

    Add postinst, postrm and prerm script to Octave
    
    They handle the pkg database.
    
    Git-Dch: Ignore

diff --git a/debian/octave.postinst b/debian/octave.postinst
new file mode 100644
index 0000000..6c3b86d
--- /dev/null
+++ b/debian/octave.postinst
@@ -0,0 +1,27 @@
+#!/bin/sh -e
+#
+# postinst script for the Debian GNU/Linux octave packages
+
+#DEBHELPER#
+
+rebuild_pkg_database () {
+    octave --silent --no-history --no-init-file	\
+	   --eval "pkg ('rebuild');"
+}
+
+case "$1" in
+    configure)
+	rebuild_pkg_database
+	;;
+    
+    triggered)
+        rebuild_pkg_database
+        ;;
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        ;;
+esac
+
+exit 0
diff --git a/debian/octave.postrm b/debian/octave.postrm
new file mode 100644
index 0000000..80c9575
--- /dev/null
+++ b/debian/octave.postrm
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+#
+# postrm script for the Debian GNU/Linux octave package
+
+#DEBHELPER#
+
+if [ "$1" = purge ] ; then
+	# Remove the packages database file
+        rm -f /usr/share/octave/octave_packages
+        # Remove the directories, if we can
+	rmdir /usr/share/octave/packages/ 2>/dev/null	\
+            && rmdir /usr/share/octave/ 2>/dev/null || true
+fi
+
diff --git a/debian/octave.prerm b/debian/octave.prerm
new file mode 100644
index 0000000..c089523
--- /dev/null
+++ b/debian/octave.prerm
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+#
+# prerm script for the Debian GNU/Linux octave package
+#
+# Originally written by Dirk Eddelbuettel <edd at debian.org>
+
+#DEBHELPER#
+
+case "$1" in
+    remove|upgrade|deconfigure)
+	# This is for old installations of the octave package
+	if [ -f /usr/share/octave/ls-R ]
+	then
+	    rm -f /usr/share/octave/ls-R
+	fi
+
+	;;
+    failed-upgrade)
+	;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 0
+    ;;
+esac
+

-- 
Debian packaging for octave



More information about the Pkg-octave-commit mailing list