Rev 98 | Rev 126 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#! /bin/sh# postinst script for pike7.8## see: dh_installdeb(1)## $Id: pike7.8-core.postinst,v 1.1 2006/01/17 22:37:48 grendel Exp $#set -ePIKE=7.8PIKEBIN=pike${PIKE}# 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 http://www.debian.org/doc/debian-policy/ or# the debian-policy package## 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'.LOCAL_DIRS="lib/pike${PIKE}/modules lib/pike${PIKE}/include"update_modules () {# Unfortunately we more or less have to delete all .o files and# redump everything, because although master.pike won't use a .o# file that is older than its corresponding source, modules often# contain compile-time conditionals like## #if constant(Mysql.mysql)## If the Mysql module is not installed, the code inside that# conditional block will not be compiled, and the referring module# won't be detected as out-of-date if the Mysql module is later# installed.find /usr/lib/$PIKEBIN -name '*.o' -delete$PIKEBIN -x dump --distquiet -r /usr/lib/$PIKEBIN}case "$1" inconfigure)update-alternatives --install /usr/bin/pike pike /usr/bin/${PIKEBIN} 12 \--slave /usr/share/man/man1/pike.1.gz pike.1.gz /usr/share/man/man1/${PIKEBIN}.1.gz## If the creation fails, so be it, user might have the filesystem mounted r/o#for d in $LOCAL_DIRS; doif [ ! -d /usr/local/$d ]; theninstall -d -m 755 -o root -g root /usr/local/$d || truefidoneupdate_modules;;abort-upgrade|abort-remove|abort-deconfigure);;triggered)update_modules;;*)echo "postinst called with unknown argument \`$1'" >&2exit 1;;esac# dh_installdeb will replace this with shell code automatically# generated by other debhelper scripts.#DEBHELPER#exit 0