File: pythonPVER-4suite.postinst

package info (click to toggle)
python-4suite 0.99cvs20050418-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,824 kB
  • ctags: 18
  • sloc: sh: 499; makefile: 183
file content (49 lines) | stat: -rw-r--r-- 1,531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/sh -e
#
# postinst script for Debian python2 packages.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
#

VERSION=@PVER@
PACKAGE=python$VERSION-4suite
DIRLIST="/usr/lib/python$VERSION/site-packages/Ft"
BINAPPS=@BINAPPS@
SHAREAPPS=@SHAREAPPS@

case "$1" in
    configure|abort-upgrade|abort-remove|abort-deconfigure)
        for i in $DIRLIST ; do
            python$VERSION -O /usr/lib/python$VERSION/compileall.py -q $i
            python$VERSION /usr/lib/python$VERSION/compileall.py -q $i
        done
    ;;

    *)
        echo "postinst called with unknown argument \`$1'" >&2
        exit 1
    ;;
esac

if [ "$1" = "configure" ]; then
    # Remove obsolete alternatives
    if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.11.1-1"; then
	for i in 4odb_clean 4odb_destroy 4odb_metadig OdlParse 4odb_clear \
	         4odb_dig 4odb_odmsdump addDbDomDocument transformDbDom \
	         4odb_create 4odb_grant 4odb_odmsload initDomDb
	do
            update-alternatives --remove $i /usr/bin/$i.$PACKAGE
	done
    fi

    # update-alternatives on things that collide
    for i in $BINAPPS; do
        update-alternatives --install /usr/bin/$i $i /usr/bin/$i.$PACKAGE 50
#        --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/$i.$PACKAGE.1.gz 
    done
    for i in $SHAREAPPS; do
        update-alternatives --install /usr/share/4Suite/$i $i /usr/share/4Suite/$i.$PACKAGE 50
#        --slave /usr/share/man/man1/$i.1.gz $i.1.gz /usr/share/man/man1/$i.$PACKAGE.1.gz 
    done
fi

#DEBHELPER#