First version
[mirror/userdir-ldap.git] / debian / postinst
diff --git a/debian/postinst b/debian/postinst
new file mode 100644 (file)
index 0000000..f4d07c7
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/bash -e
+#
+# Debian postinst script for Python 1.5 hierarchical modules
+# Written by Gregor Hoffleit <flight@debian.org>
+#
+
+NAME=userdir-ldap
+DIRLIST="/usr/lib/python1.5/site-packages"
+
+case "$1" in
+    configure|abort-upgrade|abort-remove|abort-deconfigure)
+        for i in $DIRLIST ; do
+            python -O /usr/lib/python1.5/compileall.py -q $i
+            python /usr/lib/python1.5/compileall.py -q $i
+        done
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac