#!/bin/sh
#
# $OpenBSD: INSTALL,v 1.4 2003/05/02 19:49:01 avsm Exp $
#
# php4 installation

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

do_notice()
{
    echo
    echo "+---------------"
    echo "| To finish the install, enable the php4 module with:"
    echo "|	$PREFIX/sbin/phpxs -s"
    echo "|"
    echo "| To enable parsing of PHP scripts, add the following to"
    echo "| /var/www/conf/httpd.conf:"
    echo "|"
    echo "|       AddType application/x-httpd-php .php"
    echo "|"
    echo "| Copy the config file below into /var/www/conf/php.ini"
    echo "| /usr/local/share/doc/php4/php.ini-recommended"
    echo "|"
    echo "| Don't forget that the default OpenBSD httpd is chrooted"
    echo "| into /var/www by default, so you may need to create support"
    echo "| directories such as /var/www/tmp for PHP to work correctly."
    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
