#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2001/05/06 21:52:46 naddy Exp $
#
# Pre/post-installation setup of star

# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}

# Function: tell the user what s/he needs to do to use the port just installed
#
do_notice()
{
    echo
    echo "+---------------"
    echo "| You might want to setup a link to /etc/rmt by issuing the command:"
    echo "|"
    echo "|        ln -sf /usr/local/libexec/srmt /etc/rmt"
    echo "|"
    echo "| If so, you should try to remember to reset that link"
    echo "| to its former value if you ever pkg_delete this package."
    echo "| It is NOT necessary to do this to use star."
    echo "|"
    echo "| If you use srmt, you want to set up /etc/srmt.conf,"
    echo "| cf. $PREFIX/share/examples/star/srmt.conf.sample."
    echo "+---------------"
    echo
}

# verify proper execution
#
if [ $# -ne 2 ]; then
    echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
    exit 1
fi

# Verify/process the command
#
case $2 in
    PRE-INSTALL)
	: nothing to pre-install for this port
	;;
    POST-INSTALL)
	do_notice $1
	;;
    *)
	echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
	exit 1
	;;
esac

exit 0
