From a5803c3a3e49d5d10e017a70c9e94d0545d59a09 Mon Sep 17 00:00:00 2001 From: pavet Date: Thu, 9 Sep 2004 15:33:37 +0000 Subject: Initial revision --- debian/postinst | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 debian/postinst (limited to 'debian/postinst') diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..bcbd460 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,59 @@ +#! /bin/sh +# postinst script for ivycpy +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see /usr/doc/packaging-manual/ +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +TKINTERDIR="/usr/lib/python2.1/lib-dynload" +EXAMPLEDIR="/usr/share/doc/ivycpy/examples" + +case "$1" in + configure) + #touch $TKINTERDIR/ivycpy.touch + if [ -f $TKINTERDIR/_tkinter.so ] + then + mv $TKINTERDIR/_tkinter.so $TKINTERDIR/_tkinter.so.orig + ln -s $TKINTERDIR/_tkinter.so.ivycpy $TKINTERDIR/_tkinter.so + fi + for i in $EXAMPLEDIR ; do + python -O /usr/lib/python2.1/compileall.py -q $i + python /usr/lib/python2.1/compileall.py -q $i + done + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + -- cgit v1.1