pkgsrc/www/thttpd/pkg/INSTALL
jlam 2241a81cb3 Honor CFLAGS passed in from environment during build. Improve the INSTALL
script and add a DEINSTALL script in handling the config file.
2000-12-17 22:21:44 +00:00

56 lines
957 B
Text

#! /bin/sh
#
# $NetBSD: INSTALL,v 1.2 2000/12/17 22:21:45 jlam Exp $
PKGNAME=$1
STAGE=$2
CAT="@CAT@"
CHMOD="@CHMOD@"
CP="@CP@"
SAMPLECONFDIR=${PKG_PREFIX}/share/examples
CONFDIR=/etc
CONFFILES="thttpd.conf"
case ${STAGE} in
PRE-INSTALL)
;;
POST-INSTALL)
echo "Installing configuration files:"
for file in ${CONFFILES}
do
FILE=${CONFDIR}/${file}
SAMPLEFILE=${SAMPLECONFDIR}/${file}
if [ -f ${FILE} ]
then
echo " ${FILE} already exists"
else
echo " ${FILE}"
${CP} ${SAMPLEFILE} ${FILE}
${CHMOD} 644 ${FILE}
fi
done
${CAT} << EOF
===========================================================================
Some files you might need to customize include the following:
EOF
for file in ${CONFFILES}
do
FILE=${CONFDIR}/${file}
echo " ${FILE}"
done
${CAT} << EOF
===========================================================================
EOF
;;
*)
echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0