p5-Mail-SpamAssassin tries to install files outside the fake area.

This commit is contained in:
lebel 2002-10-06 23:34:26 +00:00
parent c04b8344d6
commit ea6f05a89e
4 changed files with 90 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.9 2002/09/05 19:29:29 lebel Exp $
# $OpenBSD: Makefile,v 1.10 2002/10/06 23:34:26 lebel Exp $
COMMENT= "mailfilter to identify and mark spam"
@ -26,6 +26,9 @@ RUN_DEPENDS= :p5-Net-DNS-*:net/p5-Net-DNS \
CONFIGURE_STYLE= perl
SAMPLE_CONFIG_DIR= ${PREFIX}/share/examples/SpamAssassin
INSTALL_TARGET= LOCAL_RULES_DIR=${WRKINST}${SAMPLE_CONFIG_DIR} install
# regress insists on creating files in $HOME
PORTHOME= ${WRKDIR}/temp-home

View File

@ -1,25 +1,25 @@
#!/bin/sh
# $OpenBSD: DEINSTALL,v 1.2 2002/04/23 12:34:18 wilfried Exp $
# $OpenBSD: DEINSTALL,v 1.3 2002/10/06 23:34:26 lebel Exp $
#
# SpamAssassin de-installation
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_FILE=${SYSCONFDIR}/spamassassin.cf
CONFIG_DIR=${SYSCONFDIR}/mail/spamassassin
if [ -f $CONFIG_FILE ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you need to perform"
echo "| this step as root:"
echo "|"
echo "| rm -f $CONFIG_FILE"
echo "|"
echo "| Do not do this if you plan on re-installing $1"
echo "| at some future time."
echo "+---------------"
echo
if [ -d $CONFIG_DIR ]; then
echo
echo "+---------------"
echo "| To completely deinstall the $1 package you"
echo "| need to perform this step as root:"
echo "|"
echo "| rm -rf $CONFIG_DIR"
echo "|"
echo "| Do not do this if you plan on re-installing"
echo "| $1 at some future time."
echo "+---------------"
echo
fi
exit 0

View File

@ -0,0 +1,68 @@
#!/bin/sh
# $OpenBSD: INSTALL,v 1.1 2002/10/06 23:34:26 lebel Exp $
#
# Pre/post-installation setup of SpamAssassin
# exit on errors, use a sane path and install prefix
#
set -e
PATH=/bin:/usr/bin:/sbin:/usr/sbin
PREFIX=${PKG_PREFIX:-/usr/local}
CONFIG_DIR=${SYSCONFDIR}/mail/spamassassin
SAMPLE_CONFIG_DIR=$PREFIX/share/examples/SpamAssassin
do_notice()
{
echo
echo "+---------------"
echo "| The existing $1 configuration files in,"
echo "| $CONFIG_DIR have NOT been changed."
echo "| You may want to compare them to the current sample files"
echo "| in $SAMPLE_CONFIG_DIR, and update your configuration"
echo "| as needed."
echo "+---------------"
echo
}
do_install()
{
install -d -o root -g wheel -m 755 $CONFIG_DIR
install -o root -g wheel -m 644 $SAMPLE_CONFIG_DIR/local.cf $CONFIG_DIR/local.cf
echo
echo "+---------------"
echo "| The $1 configuration files have been installed into"
echo "| $CONFIG_DIR. Please view these files and change the"
echo "| configuration to meet your needs."
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)
if [ ! -d $CONFIG_DIR ]; then
do_install $1
elif [ ! -f $CONFIG_DIR/local.cf ]; then
do_install $1
else
do_notice $1
fi
;;
*)
echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2
exit 1
;;
esac
exit 0

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.5 2002/09/04 08:32:33 wilfried Exp $
@comment $OpenBSD: PLIST,v 1.6 2002/10/06 23:34:26 lebel Exp $
bin/spamassassin
bin/spamc
bin/spamd
@ -37,6 +37,7 @@ share/doc/SpamAssassin/README
share/doc/SpamAssassin/procmailrc.example
share/doc/SpamAssassin/sample-nonspam.txt
share/doc/SpamAssassin/sample-spam.txt
share/examples/SpamAssassin/local.cf
share/spamassassin/10_misc.cf
share/spamassassin/20_anti_ratware.cf
share/spamassassin/20_body_tests.cf
@ -60,5 +61,7 @@ share/spamassassin/languages
share/spamassassin/triplets.txt
share/spamassassin/user_prefs.template
@dirrm share/spamassassin
@dirrm share/examples/SpamAssassin
@dirrm share/doc/SpamAssassin
@dirrm ${P5SITE}/Mail/SpamAssassin