Subversion Repositories

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

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

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