Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 2 | magnus | 1 | #! /bin/sh |
| 2 | # postinst script for pmk |
||
| 3 | # |
||
| 4 | # see: dh_installdeb(1) |
||
| 5 | |||
| 6 | conffile=/etc/pmk/pmk.conf |
||
| 7 | |||
| 8 | set -e |
||
| 10 | magnus | 9 | test $DEBIAN_SCRIPT_DEBUG && set -v -x |
| 2 | magnus | 10 | |
| 11 | if [ -e /usr/share/debconf/confmodule ]; then |
||
| 12 | . /usr/share/debconf/confmodule |
||
| 13 | fi |
||
| 14 | |||
| 15 | case "$1" in |
||
| 16 | configure|reconfigure) |
||
| 17 | # Note that -s and -g are added by 25_pmksetup.dpatch; |
||
| 18 | # they are not documented in pmksetup(8). |
||
| 19 | tempfile=`mktemp -t pmksetup.XXXXXXXXXX` |
||
| 10 | magnus | 20 | settings="-u PREFIX=\"/usr\" \ |
| 2 | magnus | 21 | -u BIN_CC=\"/usr/bin/gcc\" \ |
| 22 | -u BIN_CXX=\"/usr/bin/g++\" \ |
||
| 23 | -u PATH_BIN=\"/usr/local/bin:/usr/bin:/bin\" \ |
||
| 10 | magnus | 24 | -u OS_ARCH=\"`dpkg --print-architecture`\"" |
| 25 | |||
| 26 | if { if test $DEBIAN_SCRIPT_DEBUG; then pmksetup -V -s -g $settings; |
||
| 27 | else pmksetup -s -g $settings 2> /dev/null; fi } > $tempfile |
||
| 2 | magnus | 28 | then |
| 29 | ucf --three-way --debconf-ok $tempfile $conffile |
||
| 30 | rm -f $tempfile |
||
| 31 | ucfr pmk $conffile |
||
| 32 | else |
||
| 33 | rm -f $tempfile |
||
| 34 | exit 1 |
||
| 35 | fi |
||
| 36 | |||
| 37 | # Clean out any remains of this package from the Debconf database |
||
| 38 | if [ -e /usr/share/debconf/confmodule ]; then |
||
| 39 | db_purge |
||
| 40 | fi |
||
| 41 | ;; |
||
| 42 | |||
| 43 | abort-upgrade|abort-remove|abort-deconfigure) |
||
| 44 | ;; |
||
| 45 | |||
| 46 | *) |
||
| 47 | echo "postinst called with unknown argument \`$1'" >&2 |
||
| 48 | exit 1 |
||
| 49 | ;; |
||
| 50 | esac |
||
| 51 | |||
| 52 | # dh_installdeb will replace this with shell code automatically |
||
| 53 | # generated by other debhelper scripts. |
||
| 54 | |||
| 55 | #DEBHELPER# |
||
| 56 | |||
| 57 | exit 0 |