# HG changeset patch # User paulb # Date 1124133916 0 # Node ID 757371e9e949394e4c8745395fec3f1de76aa418 # Parent 8f084df9499af331eee8801ba96a61ce89b1021d [project @ 2005-08-15 19:25:16 by paulb] Added additional scripts for Debian packages. diff -r 8f084df9499a -r 757371e9e949 packages/debian/python2.4-libxml2dom/debian/postinst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/packages/debian/python2.4-libxml2dom/debian/postinst Mon Aug 15 19:25:16 2005 +0000 @@ -0,0 +1,49 @@ +#! /bin/sh +# postinst script for libxml2dom +# +# 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 http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# 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'. + +PACKAGE=python2.4-libxml2dom +VERSION=2.4 +LIB="/usr/lib/python$VERSION" +DIRLIST="$LIB/site-packages/libxml2dom" + +case "$1" in + configure|abort-upgrade|abort-remove|abort-deconfigure) + for i in $DIRLIST ; do + /usr/bin/python$VERSION -O $LIB/compileall.py -q $i + /usr/bin/python$VERSION $LIB/compileall.py -q $i + done + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + + +exit 0 + + diff -r 8f084df9499a -r 757371e9e949 packages/debian/python2.4-libxml2dom/debian/prerm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/packages/debian/python2.4-libxml2dom/debian/prerm Mon Aug 15 19:25:16 2005 +0000 @@ -0,0 +1,26 @@ +#! /bin/sh +# prerm script for libxml2dom + +set -e + +PACKAGE=python2.4-libxml2dom +VERSION=2.4 +LIB="/usr/lib/python$VERSION" +DIRLIST="$LIB/site-packages/libxml2dom" + +case "$1" in + remove|upgrade|failed-upgrade) + for i in $DIRLIST ; do + find $i -name '*.py[co]' -exec rm \{\} \; + done + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + + +exit 0