#!/bin/sh
# $FreeBSD$
#
case $2 in
POST-INSTALL)
echo "======================================================"
if [ x"${DB_TYPE}" != "x" ]; then
echo "If this is your first installation of sympa, please load"
echo "this file with your ${DB_TYPE} database client:"
echo " %%PREFIX%%/libexec/sympa/create_db.${DB_TYPE}"
echo ""
fi
echo "To configure sympa interactively, please run:"
echo " perl %%PREFIX%%/libexec/sympa/sympa_wizard.pl"
echo ""
for conf in sympa.conf wwsympa.conf
do [ ! -f ${PKG_PREFIX}/etc/${conf} ] \
&& cp -p ${PKG_PREFIX}/etc/${conf}.sample ${PKG_PREFIX}/etc/${conf} \
&& chmod u+w ${PKG_PREFIX}/etc/${conf}
done
echo "You may also manually edit the two configuration files:"
echo " ${PKG_PREFIX}/etc/sympa.conf"
echo " ${PKG_PREFIX}/etc/wwsympa.conf"
echo "======================================================"
echo "To set up the wwsympa server, add something like this to"
echo "your Apache configuration file:"
echo ""
echo " DocumentRoot \"%%DATADIR%%\""
echo " AddDefaultCharset UTF-8"
echo " DirectoryIndex wws"
echo " Options +Indexes"
if [ x"${WITH_FASTCGI}" != x ]; then
echo " LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so"
echo " "
echo " SetHandler fastcgi-script"
echo " "
fi
echo " "
echo " Allow from all"
echo " "
echo " ScriptAlias /wws %%PREFIX%%/libexec/sympa/wwsympa-wrapper"
echo "======================================================"
exit 0
;;
PRE-INSTALL)
exit 0
;;
esac
exit 0