Subversion Repositories

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

Rev 10 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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