postinst is in ilisp 5.12.0+cvs.2004.12.26-18.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | #! /bin/sh
# postinst script for ilisp
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see /usr/doc/packaging-manual/
#
# quoting from the policy:
# Any necessary prompting should almost always be confined to the
# post-installation script, and should be protected with a conditional
# so that unnecessary prompting doesn't happen if a package's
# installation fails and the `postinst' is called with `abort-upgrade',
# `abort-remove' or `abort-deconfigure'.
pkg=ilisp
conf_file=/etc/ilisp/ilisp-keybindings.el
group=ilisp
if [ -e /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
else
exit 1
fi
set_keybindings()
{
db_get $pkg/fsf-compliant
if [ "$RET" = "true" ]; then
echo "(setq ilisp-*use-fsf-compliant-keybindings* t)" > $conf_file
else
echo "(setq ilisp-*use-fsf-compliant-keybindings* nil)" > $conf_file
fi
}
# Needed to work around version 5.12.0+cvs.2003.05.21 which
# erroreously deleted symlinks in postrm. Thus, upgrades would not
# work from that version without this work-around
ensure_symlinks()
{
source=/usr/share/common-lisp/source/ilisp
dest=/usr/lib/ilisp
for i in $source/*.lisp ; do
b=$(basename $i)
if [ ! -h "$dest/$b" ]; then
ln -s $i $dest
fi
done
source=/usr/share/ilisp
for i in $source/*.scm ; do
b=$(basename $i)
if [ ! -h "$dest/$b" ]; then
ln -s $i $dest
fi
done
}
case "$1" in
configure)
set_keybindings
# create ${group} group if not already present
if ! getent group ${group} > /dev/null; then
addgroup --quiet --system ${group}
fi
# allow users in ${group} to build .fasl files for global use
if ! dpkg-statoverride --list /usr/lib/ilisp >/dev/null 2>&1
then
dpkg-statoverride --update --add root ${group} 775 /usr/lib/ilisp
fi
register-common-lisp-source ilisp
ensure_symlinks
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument: $1" >&2
exit 0
;;
esac
# Automatically added by dh_installemacsen
if [ "$1" = "configure" ] && [ -x /usr/lib/emacsen-common/emacs-package-install ]
then
/usr/lib/emacsen-common/emacs-package-install ilisp
fi
# End automatically added section
exit 0
|