#!/bin/sh
# This is part of the lw-installer program: 
#    http://b9.com/lw-installer.html
#
# Copyright (c) 2002 Kevin M. Rosenberg <kmr@debian.org>
#
# lw-installer is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License (version 2) as
# published by the Free Software Foundation.
#
# lw-installer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have a copy of the GNU General Public License on your
# Debian system in the file /usr/share/common-licenses/GPL-2

set -e


# summary of how this script can be called:
#        * <prerm> `remove'
#        * <old-prerm> `upgrade' <new-version>
#        * <new-prerm> `failed-upgrade' <old-version>
#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
#        * <deconfigured's-prerm> `deconfigure' `in-favour'
#          <package-being-installed> <version> `removing'
#          <conflicting-package> <version>
# for details, see /usr/share/doc/packaging-manual/

pkg=lw-per-installer
lw_dir=/usr/lib/lispworks-personal
lw_usrbin=/usr/bin/lispworks-personal
doc_dir=/usr/share/doc/${pkg}

lw_version=4300
readme_file=readme-${lw_version}.txt
online_dirname=online

rm_lispworks()
{
    rm -f ${doc_dir}/${readme_file}.gz
    rm -f ${doc_dir}/${online_dirname}
    rm -fr ${lw_dir}
    rm -f ${lw_usrbin}
}


case "$1" in
    remove)
        rm_lispworks
	;;            
    upgrade|failed-upgrade)
        rm_lispworks
	;;
    deconfigure)
        rm_lispworks
	;;
    *)
	echo "prerm called with unknown argument \`$1'" >&2
	exit 0
	;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#



