summaryrefslogtreecommitdiffstats
path: root/debian/postinst
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2002-04-24 12:51:00 (GMT)
committerSteven Knight <knight@baldmt.com>2002-04-24 12:51:00 (GMT)
commit7eddfeb87f28c4cf8ba6839efdad8b366214ec01 (patch)
tree5687008a55ac5282705d8800a9f955c8bc3cafa1 /debian/postinst
parent35f863c494e66e1524789ac329a6e9aff5f46189 (diff)
downloadSCons-7eddfeb87f28c4cf8ba6839efdad8b366214ec01.zip
SCons-7eddfeb87f28c4cf8ba6839efdad8b366214ec01.tar.gz
SCons-7eddfeb87f28c4cf8ba6839efdad8b366214ec01.tar.bz2
Rework Debian packaging ito incorporate changes from Moshe Zadka, official Debian SCons package maintainer.
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst17
1 files changed, 17 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..1e05a5d
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -e
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/scons -a -d /usr/share/doc/scons ]; then
+ ln -sf ../share/doc/scons /usr/doc/scons
+ fi
+fi
+
+NAME=scons
+case "$1" in
+ configure|abort-upgrade|abort-remove|abort-deconfigure)
+ dpkg --listfiles $NAME | grep '\.py$' | \
+ xargs -n 1 /usr/bin/python -c 'import py_compile,sys;py_compile.compile(sys.argv[1])'
+ dpkg --listfiles $NAME | grep '\.py$' | \
+ xargs -n 1 /usr/bin/python -O -c 'import py_compile,sys;py_compile.compile(sys.argv[1])'
+ ;;
+esac