libxml2dom

Annotated packages/debian-etch/python-libxml2dom/debian/postinst

283:feb5b436161d
2007-06-03 paulb [project @ 2007-06-03 22:05:56 by paulb] Added tentative packaging files for Debian Etch.
paulb@283 1
#! /bin/sh 
paulb@283 2
# postinst script for libxml2dom
paulb@283 3
#
paulb@283 4
# see: dh_installdeb(1)
paulb@283 5
paulb@283 6
set -e
paulb@283 7
paulb@283 8
# summary of how this script can be called:
paulb@283 9
#        * <postinst> `configure' <most-recently-configured-version>
paulb@283 10
#        * <old-postinst> `abort-upgrade' <new version>
paulb@283 11
#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
paulb@283 12
#          <new-version>
paulb@283 13
#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
paulb@283 14
#          <failed-install-package> <version> `removing'
paulb@283 15
#          <conflicting-package> <version>
paulb@283 16
# for details, see http://www.debian.org/doc/debian-policy/ or
paulb@283 17
# the debian-policy package
paulb@283 18
#
paulb@283 19
# quoting from the policy:
paulb@283 20
#     Any necessary prompting should almost always be confined to the
paulb@283 21
#     post-installation script, and should be protected with a conditional
paulb@283 22
#     so that unnecessary prompting doesn't happen if a package's
paulb@283 23
#     installation fails and the `postinst' is called with `abort-upgrade',
paulb@283 24
#     `abort-remove' or `abort-deconfigure'.
paulb@283 25
paulb@283 26
PACKAGE=python2.3-libxml2dom
paulb@283 27
VERSION=2.3
paulb@283 28
LIB="/usr/lib/python$VERSION"
paulb@283 29
DIRLIST="$LIB/site-packages/libxml2dom"
paulb@283 30
paulb@283 31
case "$1" in
paulb@283 32
    configure|abort-upgrade|abort-remove|abort-deconfigure)
paulb@283 33
        for i in $DIRLIST ; do
paulb@283 34
            /usr/bin/python$VERSION -O $LIB/compileall.py -q $i
paulb@283 35
            /usr/bin/python$VERSION $LIB/compileall.py -q $i
paulb@283 36
        done
paulb@283 37
    ;;
paulb@283 38
paulb@283 39
    *)
paulb@283 40
        echo "postinst called with unknown argument \`$1'" >&2
paulb@283 41
        exit 1
paulb@283 42
    ;;
paulb@283 43
esac
paulb@283 44
paulb@283 45
paulb@283 46
paulb@283 47
exit 0
paulb@283 48
paulb@283 49