libxml2dom

Annotated packages/ubuntu-hoary/python2.4-libxml2dom/debian/postinst

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