[SCM] mma/master: Add postinst and prerm to handle "mma -G" run
foka at users.alioth.debian.org
foka at users.alioth.debian.org
Sat Sep 19 03:35:32 UTC 2015
The following commit has been merged in the master branch:
commit 6124f8369e2df6ed6ee36fb3c86ec9d65e3fbe2b
Author: Anthony Fok <foka at debian.org>
Date: Thu Sep 17 18:09:59 2015 -0600
Add postinst and prerm to handle "mma -G" run
i.e. the creation and deletion of .mmaDB Groove dependency database files
inside the sub-directories of /usr/share/mma/lib/.
diff --git a/debian/mma.postinst b/debian/mma.postinst
new file mode 100644
index 0000000..661a49b
--- /dev/null
+++ b/debian/mma.postinst
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+# Running py3compile first so that "mma -G" would skip its own attempt of
+# byte-compiling its Python source.
+
+#DEBHELPER#
+
+case "$1" in
+ configure)
+ mma -G
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/debian/mma.prerm b/debian/mma.prerm
new file mode 100644
index 0000000..0092613
--- /dev/null
+++ b/debian/mma.prerm
@@ -0,0 +1,20 @@
+#!/bin/sh
+set -e
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ find /usr/share/mma/lib -type f -name .mmaDB -exec rm -f {} \;
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--
mma packaging
More information about the pkg-multimedia-commits
mailing list