Move to sarge, i.e. depend on python 2.3
[mirror/userdir-ldap.git] / debian / postinst
index f4d07c7..7905b7c 100644 (file)
@@ -1,17 +1,17 @@
 #! /bin/bash -e
 #
-# Debian postinst script for Python 1.5 hierarchical modules
+# Debian postinst script for Python hierarchical modules
 # Written by Gregor Hoffleit <flight@debian.org>
 #
 
-NAME=userdir-ldap
-DIRLIST="/usr/lib/python1.5/site-packages"
+PYTHON_VER="2.3"
+DIRLIST="/usr/lib/python$PYTHON_VER/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
+            python -O /usr/lib/python$PYTHON_VER/compileall.py -q $i
+            python /usr/lib/python$PYTHON_VER/compileall.py -q $i
         done
     ;;
 
@@ -20,3 +20,8 @@ case "$1" in
         exit 1
     ;;
 esac
+
+if [ "$1" = "configure" ]
+then
+    test ! -f /usr/local/bin/ud-replicate || rm -f /usr/local/bin/ud-replicate
+fi