Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 2 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#! /bin/sh
# postinst script for pmk
#
# see: dh_installdeb(1)

conffile=/etc/pmk/pmk.conf

set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x

if [ -e /usr/share/debconf/confmodule ]; then
    . /usr/share/debconf/confmodule
fi

case "$1" in
    configure|reconfigure)
        # Note that -s and -g are added by 25_pmksetup.dpatch;
        # they are not documented in pmksetup(8).
        tempfile=`mktemp -t pmksetup.XXXXXXXXXX`
        settings="-u PREFIX=\"/usr\" \
            -u BIN_CC=\"/usr/bin/gcc\" \
            -u BIN_CXX=\"/usr/bin/g++\" \
            -u PATH_BIN=\"/usr/local/bin:/usr/bin:/bin\" \
            -u OS_ARCH=\"`dpkg --print-architecture`\""

        if { if test $DEBIAN_SCRIPT_DEBUG; then pmksetup -V -s -g $settings;
             else pmksetup -s -g $settings 2> /dev/null; fi } > $tempfile
        then
            ucf --three-way --debconf-ok $tempfile $conffile
            rm -f $tempfile
            ucfr pmk $conffile
        else
            rm -f $tempfile
            exit 1
        fi

        # Clean out any remains of this package from the Debconf database
        if [ -e /usr/share/debconf/confmodule ]; then
            db_purge
        fi
    ;;

    abort-upgrade|abort-remove|abort-deconfigure)
    ;;

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

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0