#!/bin/sh
#
# Postinstall script written by Ron Record (rr@sco.com) for use with my
# OpenServer packaging of PHP4.
# 

PATH=/usr/local/bin:$PATH
export PATH

scriptname="$0"
step="$1"
keywords="$2"
pkglist="$3"

# Source in the standard functions library, ccsSetup.sh
. ccsSetup.sh

ccs_return_value=0

APXS=/usr/local/apache/bin/apxs

#
# Configure Apache's httpd.conf with PHP4 support
#
PostExport()
{
    [ -x $APXS ] && {
        cd /usr/local/apache
        $APXS -e -a -n php4 libexec/libphp4.so
    }
    echo "\n##########################################################"
    echo "\nPHP Version 4.1.2 is successfully installed on your system."
    echo "To perform an initial test of the system, add the following line"
    echo "to /usr/local/apache/conf/httpd.conf :"
    echo "\tAddType application/x-httpd-php .php"
    echo "Restart the Apache web server and point your browser at the URL:"
    echo "\thttp://your.domain.name/test_phpinfo.php"
    echo "\n##########################################################"
}

case "$step" in
        POST_EXPORT) PostExport ;;
esac

exit $ccs_return_value

