File: postinst

package info (click to toggle)
pyopengl 2.0.1.08-5.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,484 kB
  • ctags: 9,036
  • sloc: pascal: 64,950; xml: 28,088; ansic: 20,696; python: 19,761; tcl: 668; makefile: 240; sh: 25
file content (31 lines) | stat: -rw-r--r-- 770 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
#!/bin/sh
#
# postinst script for Debian python packages.
# Written 1998 by Gregor Hoffleit <flight@debian.org>.
# Modified 2001 by Matthias Klose <doko@debian.org>

PACKAGE=`basename $0 .postinst`
PV=`dpkg --listfiles $PACKAGE | sed -n -e '/^\/usr\/lib\/python.*\//{
  s,/usr/lib/python\([0-9][0-9.]*\)/.*,\1,p
  q
}'`
PYTHON=python$PV
DIRLIST="/usr/lib/python$PV/site-packages/OpenGL"

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

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

#DEBHELPER#

exit 0