3 # Abort if any command returns an error value
6 # This is filled in by debian/rules
9 # This script is called as the last step of the installation of the
10 # package. All the package's files are in place, dpkg has already done
11 # its automatic conffile handling, and all the packages we depend of
12 # are already fully installed and configured.
14 package_name=#PACKAGE#
16 if [ -z "package_name" ]; then
17 print >&2 "Internal Error. Please report a bug."
21 #perl -e 'print readlink("/usr/doc/'$package_name'"), "\n"; '
24 # Configure this package. If the package must prompt the user for
25 # information, do it here.
27 if [ -x /usr/sbin/install-docs ]; then
28 /usr/sbin/install-docs -i /usr/share/doc-base/debian-policy
29 /usr/sbin/install-docs -i /usr/share/doc-base/debian-menu-policy
30 /usr/sbin/install-docs -i /usr/share/doc-base/debian-mime-policy
31 /usr/sbin/install-docs -i /usr/share/doc-base/debian-perl-policy
32 /usr/sbin/install-docs -i /usr/share/doc-base/debian-policy-process
33 /usr/sbin/install-docs -i /usr/share/doc-base/debconf-spec
34 /usr/sbin/install-docs -i /usr/share/doc-base/fhs
37 # There are three sub-cases:
38 if test "${2+set}" != set; then
39 # We're being installed by an ancient dpkg which doesn't remember
40 # which version was most recently configured, or even whether
41 # there is a most recently configured version.
44 elif test -z "$2" || test "$2" = "<unknown>"; then
45 # The package has not ever been configured on this system, or was
46 # purged since it was last configured.
50 # Version $2 is the most recently configured version of this
59 # Back out of an attempt to upgrade this package FROM THIS VERSION
60 # to version $2. Undo the effects of "prerm upgrade $2".
65 if test "$2" != in-favour; then
66 echo "$0: undocumented call to \`postinst $*'" 1>&2
69 # Back out of an attempt to remove this package, which was due to
70 # a conflict with package $3 (version $4). Undo the effects of
71 # "prerm remove in-favour $3 $4".
76 if test "$2" != in-favour || test "$5" != removing; then
77 echo "$0: undocumented call to \`postinst $*'" 1>&2
80 # Back out of an attempt to deconfigure this package, which was
81 # due to package $6 (version $7) which we depend on being removed
82 # to make way for package $3 (version $4). Undo the effects of
83 # "prerm deconfigure in-favour $3 $4 removing $6 $7".
87 *) echo "$0: didn't understand being called with \`$1'" 1>&2