1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-05 06:27:37 +00:00

- Update to 5.0.3

- Add many recommended Perl modules to dependencies
- Remove DOCS option (there are no docs now)
- Since there are no Sophos binaries, remove the Sophos.install.freebsd file
- Simplify do-install - use COPYTREE_SHARE, COPYTREE_BIN

PR:		217142
Submitted by:	pkubaj@anongoth.pl
Approved by:	maintainer(timeout, > 100 days)
This commit is contained in:
Wen Heping 2017-06-10 23:12:19 +00:00
parent 653efc072e
commit bd6db806bc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=443125
7 changed files with 563 additions and 892 deletions

View File

@ -2,11 +2,10 @@
# $FreeBSD$
PORTNAME= MailScanner
PORTVERSION= 4.85.2
#PORTREVISION= 0
PORTVERSION= 5.0.3
CATEGORIES= mail
MASTER_SITES= https://s3.amazonaws.com/mailscanner/release/v4/tar/
DISTNAME= ${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}
MASTER_SITES= https://s3.amazonaws.com/msv5/release/
DISTNAME= ${PORTNAME}-${PORTVERSION}-${PATCHLEVEL}.nix
MAINTAINER= kkobb@skylinecorp.com
COMMENT= Powerful virus/spam scanning framework for mail gateways
@ -31,25 +30,47 @@ BUILD_DEPENDS= \
p5-Filesys-Df>=0:sysutils/p5-Filesys-Df \
p5-Sys-Hostname-Long>=0:sysutils/p5-Sys-Hostname-Long \
p5-OLE-Storage_Lite>=0:devel/p5-OLE-Storage_Lite \
p5-Sys-SigAction>=0:devel/p5-Sys-SigAction
p5-Sys-SigAction>=0:devel/p5-Sys-SigAction \
p5-Inline>=0:devel/p5-Inline \
p5-Inline-C>=0:devel/p5-Inline-C \
p5-Mail-IMAPClient>=0:mail/p5-Mail-IMAPClient \
p5-Mail-SPF>=0:mail/p5-Mail-SPF \
p5-Net-CIDR-Lite>=0:net/p5-Net-CIDR-Lite \
p5-Net-DNS-Resolver-Programmable>=0:dns/p5-Net-DNS-Resolver-Programmable \
p5-Net-IP>=0:net-mgmt/p5-Net-IP \
p5-Parse-RecDescent>=0:devel/p5-Parse-RecDescent \
p5-Test-Manifest>=0:devel/p5-Test-Manifest \
p5-URI>=0:net/p5-URI \
p5-IO-String>=0:devel/p5-IO-String \
p5-Business-ISBN>=0:misc/p5-Business-ISBN \
p5-Business-ISBN-Data>=0:misc/p5-Business-ISBN-Data \
p5-Data-Dump>=0:devel/p5-Data-Dump \
p5-Digest-SHA1>=0:security/p5-Digest-SHA1 \
p5-File-ShareDir>=0:devel/p5-File-ShareDir \
p5-IP-Country>=0:net/p5-IP-Country \
curl:ftp/curl
RUN_DEPENDS:= ${BUILD_DEPENDS} \
bash:shells/bash \
tnef:converters/tnef \
wget:ftp/wget
CONFLICTS= MailScanner-devel-[0-9]*
CONFLICTS= ${PORTNAME}-devel-[0-9]*
PATCHLEVEL= 3
PATCHLEVEL= 7
USES= perl5 shebangfix
SHEBANG_FILES= bin/[^acu]* bin/analyse_SpamAssassin_cache bin/clean* \
bin/update* \
lib/[^M]* lib/${PORTNAME}/[^C]* lib/${PORTNAME}/*.p[ml] \
lib/${PORTNAME}.pm lib/${PORTNAME}/CustomFunctions/*
SHEBANG_FILES= usr/sbin/${PORTNAME} usr/sbin/ms-create-locks \
usr/sbin/ms-peek usr/sbin/ms-perl-check \
usr/sbin/ms-sa-cache usr/sbin/ms-update-bad-emails \
usr/sbin/ms-upgrade-conf \
usr/lib/${PORTNAME}/wrapper/bitdefender-autoupdate \
usr/lib/${PORTNAME}/wrapper/clamav-autoupdate \
usr/lib/${PORTNAME}/wrapper/generic-autoupdate \
usr/lib/${PORTNAME}/wrapper/sophos-autoupdate
WRKSRC= ${WRKDIR}/${PORTNAME}-install-${PORTVERSION}
SUB_FILES= MailScanner.8 pkg-message pkg-install pkg-deinstall
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
SUB_FILES= ${PORTNAME}.8 pkg-message pkg-install
SUB_LIST= DATADIR=${DATADIR} \
PERL=${PERL} \
PKGVERSION=${PKGVERSION} \
@ -57,7 +78,7 @@ SUB_LIST= DATADIR=${DATADIR} \
ETC_FILES="${ETC_FILES}" \
MCP_FILES="${MCP_FILES}"
OPTIONS_DEFINE= SPAMASSASSIN CLAMAV CLAMAVMODULE BDC DOCS
OPTIONS_DEFINE= SPAMASSASSIN CLAMAV CLAMAVMODULE BDC
SPAMASSASSIN_DESC= Install SpamAssassin
CLAMAV_DESC= Install ClamAV
CLAMAVMODULE_DESC= Install ClamAV Module
@ -108,7 +129,7 @@ SUB_LIST+= WITHOUT_SPAMASSASSIN_SYMLINK=no
.endif
DOC_FILES= README
ETC_FILES= MailScanner.conf filename.rules.conf \
ETC_FILES= ${PORTNAME}.conf filename.rules.conf \
archives.filename.rules.conf archives.filetype.rules.conf \
filetype.rules.conf spam.assassin.prefs.conf \
spam.lists.conf virus.scanners.conf \
@ -118,173 +139,70 @@ ETC_FILES= MailScanner.conf filename.rules.conf \
MCP_FILES= mcp.spam.assassin.prefs.conf \
10_example.cf v320.pre
USRLOCAL_FILES_LIB= \
bitdefender-autoupdate f-prot-autoupdate \
f-secure-wrapper inoculan-autoupdate \
kavdaemonclient-wrapper mcafee-autoupdate \
nod32-autoupdate rav-autoupdate \
rav-wrapper sophos-autoupdate
bitdefender-autoupdate f-secure-autoupdate \
f-secure-wrapper sophos-autoupdate
USE_RC_SUBR= mailscanner mta
post-extract:
@cd ${WRKSRC} \
&& ${TAR} xzf \
perl-tar/MailScanner-${PORTVERSION}-${PATCHLEVEL}.tar.gz \
&& ${MV} MailScanner-${PORTVERSION}-${PATCHLEVEL}/* .
post-patch:
${REINPLACE_CMD} -e 's,\$$(mktemp),$$(mktemp -t tmp),' \
${WRKSRC}/lib/clamav-wrapper \
${WRKSRC}/lib/trend-autoupdate \
${WRKSRC}/lib/bitdefender-wrapper \
${WRKSRC}/lib/kaspersky-wrapper \
${WRKSRC}/bin/Sophos.install
${WRKSRC}/usr/lib/${PORTNAME}/wrapper/clamav-wrapper \
${WRKSRC}/usr/lib/${PORTNAME}/wrapper/bitdefender-wrapper
do-build:
@${REINPLACE_CMD} \
-e 's,/bin/bash,${LOCALBASE}/bin/bash,g' \
-e 's,/bin/sed,/usr/bin/sed,g' \
-e 's,/etc/MailScanner/MailScanner.conf,${PREFIX}/etc/MailScanner/MailScanner.conf,g' \
-e 's,/etc/init.d/MailScanner,${LOCALBASE}/etc/rc.d/mailscanner,g' \
-e 's,/etc/${PORTNAME}/${PORTNAME}.conf,${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf,g' \
-e 's,/etc/init.d/${PORTNAME},${LOCALBASE}/etc/rc.d/mailscanner,g' \
-e 's,/etc/mail/,${LOCALBASE}/etc/mail/,g' \
-e 's,/opt/MailScanner/bin,${PREFIX}/libexec/MailScanner,g' \
-e 's,/opt/MailScanner/etc/reports,${DATADIR}/reports,g' \
-e 's,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g' \
-e 's,/opt/MailScanner/lib,${PREFIX}/lib/MailScanner,g' \
-e 's,/opt/MailScanner/var/MailScanner.pid,/var/run/MailScanner.pid,g' \
-e 's,/opt/${PORTNAME}/bin,${PREFIX}/libexec/${PORTNAME},g' \
-e 's,/opt/${PORTNAME}/etc/reports,${DATADIR}/reports,g' \
-e 's,/opt/${PORTNAME}/etc,${PREFIX}/etc/${PORTNAME},g' \
-e 's,/opt/${PORTNAME}/lib,${PREFIX}/lib/${PORTNAME},g' \
-e 's,/opt/${PORTNAME}/var/${PORTNAME}.pid,/var/run/${PORTNAME}.pid,g' \
-e 's,/usr/bin/clamscan,${LOCALBASE}/bin/clamscan,g' \
-e 's,/usr/bin/sa-compile,${LOCALBASE}/bin/sa-compile,g' \
-e 's,/usr/bin/sa-update,${LOCALBASE}/bin/sa-update,g' \
-e 's,/usr/bin/unzip,${UNZIP_CMD},g' \
-e 's,/usr/bin/wget,${LOCALBASE}/bin/wget,g' \
-e 's,/usr/lib/sendmail,/usr/sbin/sendmail,g' \
${WRKSRC}/bin/MailScanner \
${WRKSRC}/bin/mailscanner_create_locks \
${WRKSRC}/bin/processing_messages_alert \
${WRKSRC}/bin/update_virus_scanners \
${WRKSRC}/bin/cron/update_virus_scanners.cron \
${WRKSRC}/bin/update_bad_phishing_emails \
${WRKSRC}/bin/update_phishing_sites \
${WRKSRC}/bin/update_bad_phishing_sites \
${WRKSRC}/bin/cron/update_phishing_sites.cron \
${WRKSRC}/bin/cron/update_bad_phishing_sites.cron \
${WRKSRC}/bin/cron/update_spamassassin.cron \
${WRKSRC}/bin/update_spamassassin \
${WRKSRC}/bin/clean.SA.cache \
${WRKSRC}/lib/MailScanner/ConfigDefs.pl \
${WRKSRC}/lib/MailScanner/SystemDefs.pm \
${WRKSRC}/lib/clamav-wrapper \
${WRKSRC}/lib/sophos-autoupdate
${WRKSRC}/usr/sbin/${PORTNAME} \
${WRKSRC}/usr/sbin/ms-create-locks \
${WRKSRC}/usr/lib/${PORTNAME}/init/ms-init \
@${REINPLACE_CMD} \
-e 's,/opt/MailScanner/var/MailScanner.pid,/var/run/MailScanner.pid,g' \
-e 's,/opt/${PORTNAME}/var/${PORTNAME}.pid,/var/run/${PORTNAME}.pid,g' \
-e 's,/usr/lib/sendmail,/usr/sbin/sendmail,g' \
-e 's,/opt/MailScanner/bin,${PREFIX}/bin,g' \
-e 's,/opt/MailScanner/etc/reports,${DATADIR}/reports,g' \
-e 's,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g' \
-e 's,/opt/MailScanner/lib,${PREFIX}/lib/MailScanner,g' \
-e 's,/opt/${PORTNAME}/bin,${PREFIX}/bin,g' \
-e 's,/opt/${PORTNAME}/etc/reports,${DATADIR}/reports,g' \
-e 's,/opt/${PORTNAME}/etc,${PREFIX}/etc/${PORTNAME},g' \
-e 's,/opt/${PORTNAME}/lib,${PREFIX}/lib/${PORTNAME},g' \
-e 's,/usr/bin/unrar,${LOCALBASE}/bin/unrar,g' \
-e 's,/bin/gunzip,/usr/bin/gunzip,g' \
-e 's,/etc/mail/spamassassin,${LOCALBASE}/etc/mail/spamassassin,g' \
-e 's,/tmp/clamd.socket,/var/run/clamav/clamd.sock,g' \
-e 's,/usr/local/share/clamav,/var/db/clamav,g' \
${WRKSRC}/etc/MailScanner.conf
${WRKSRC}/etc/${PORTNAME}/${PORTNAME}.conf
@${REINPLACE_CMD} \
-e 's,/opt/MailScanner/lib,${PREFIX}/libexec/MailScanner,g' \
-e 's,/opt/${PORTNAME}/lib,${PREFIX}/libexec/${PORTNAME},g' \
-e 's,/bin/false,/usr/bin/false,' \
${WRKSRC}/etc/virus.scanners.conf
${WRKSRC}/etc/${PORTNAME}/virus.scanners.conf
.for FILE in ${USRLOCAL_FILES_LIB}
@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \
${WRKSRC}/lib/${FILE}
${WRKSRC}/usr/lib/${PORTNAME}/wrapper/${FILE}
.endfor
@${FIND} ${WRKSRC} \( -name "*.bak" -or -name "*.orig" \) -delete
do-install:
@${ECHO_MSG} -n ">> Installing files in ${PREFIX}/sbin..."
${INSTALL_SCRIPT} ${WRKSRC}/bin/MailScanner ${STAGEDIR}${PREFIX}/sbin/mailscanner
${LN} -sf ${PREFIX}/sbin/mailscanner ${STAGEDIR}${PREFIX}/sbin/MailScanner
@${ECHO_MSG} " [DONE]"
@${ECHO_MSG} -n \
">> Installing files in ${PREFIX}/libexec/MailScanner..."
${MKDIR} ${STAGEDIR}${PREFIX}/libexec/MailScanner
cd ${WRKSRC}/lib && ${FIND} * -name "*-wrapper" -exec \
${INSTALL_SCRIPT} {} ${STAGEDIR}${PREFIX}/libexec/MailScanner/{}.sample \;
cd ${WRKSRC}/lib && ${FIND} * -name "*-autoupdate" -exec \
${INSTALL_SCRIPT} {} ${STAGEDIR}${PREFIX}/libexec/MailScanner/{}.sample \;
.for FILE in analyse_SpamAssassin_cache clean.SA.cache clean.quarantine \
mailscanner_create_locks processing_messages_alert Quick.Peek \
update_bad_phishing_emails update_phishing_sites \
update_bad_phishing_sites cron/update_phishing_sites.cron \
cron/update_bad_phishing_sites.cron update_virus_scanners \
cron/update_virus_scanners.cron update_spamassassin \
cron/update_spamassassin.cron
${INSTALL_SCRIPT} ${WRKSRC}/bin/${FILE} \
${STAGEDIR}${PREFIX}/libexec/MailScanner/
.endfor
@${ECHO_MSG} " [DONE]"
@${ECHO_MSG} -n ">> Installing files in ${PREFIX}/etc/MailScanner..."
${MKDIR} ${STAGEDIR}${PREFIX}/etc/MailScanner
.for FILE in ${ETC_FILES}
${INSTALL_DATA} ${WRKSRC}/etc/${FILE} \
${STAGEDIR}${PREFIX}/etc/MailScanner/${FILE}.sample
.endfor
${MKDIR} ${STAGEDIR}${PREFIX}/etc/MailScanner/rules
cd ${WRKSRC}/etc/rules \
&& ${INSTALL_DATA} EXAMPLES README \
${STAGEDIR}${PREFIX}/etc/MailScanner/rules
.for RULES in spam.whitelist.rules bounce.rules max.message.size.rules
${INSTALL_DATA} ${WRKSRC}/etc/rules/${RULES} \
${STAGEDIR}${PREFIX}/etc/MailScanner/rules/${RULES}.sample
.endfor
${MKDIR} ${STAGEDIR}${PREFIX}/etc/MailScanner/mcp
.for FILE in ${MCP_FILES}
${INSTALL_DATA} ${WRKSRC}/etc/mcp/${FILE} \
${STAGEDIR}${PREFIX}/etc/MailScanner/mcp/${FILE}.sample
.endfor
${MKDIR} ${STAGEDIR}${PREFIX}/etc/MailScanner/conf.d
${INSTALL_DATA} ${WRKSRC}/etc/conf.d/README \
${STAGEDIR}${PREFIX}/etc/MailScanner/conf.d/README
@${ECHO_MSG} " [DONE]"
@${ECHO_MSG} -n ">> Installing files in ${DATADIR}..."
${MKDIR} ${STAGEDIR}${DATADIR}
cd ${WRKSRC}/etc && ${FIND} reports -type d ! -name "*.old" -exec \
${MKDIR} ${STAGEDIR}${DATADIR}/{} \;
cd ${WRKSRC}/etc \
&& ${FIND} reports \( -type d -name "*.old" -prune \) \
-o \( -type f ! \( -name "*.orig" -o -name "*.bak" \) \
-exec ${INSTALL_DATA} {} ${STAGEDIR}${DATADIR}/{}.sample \; \)
${INSTALL_SCRIPT} ${WRKSRC}/bin/upgrade_MailScanner_conf \
${STAGEDIR}${DATADIR}
${LN} -sf ${DATADIR}/upgrade_MailScanner_conf \
${STAGEDIR}${DATADIR}/upgrade_languages_conf
@${ECHO_MSG} " [DONE]"
@${ECHO_MSG} -n ">> Installing files in ${PREFIX}/lib..."
${MKDIR} ${STAGEDIR}${PREFIX}/lib/MailScanner/MailScanner/CustomFunctions
${INSTALL_SCRIPT} ${WRKSRC}/lib/MailScanner.pm \
${STAGEDIR}${PREFIX}/lib/MailScanner/MailScanner.pm
cd ${WRKSRC}/lib/MailScanner \
&& ${FIND} * -type f ! -name "*.orig" -exec \
${INSTALL_SCRIPT} {} ${STAGEDIR}${PREFIX}/lib/MailScanner/MailScanner/{} \;
@${ECHO_MSG} " [DONE]"
.if ${PORT_OPTIONS:MDOCS}
@${ECHO_MSG} -n ">> Installing docs and manpage..."
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${FILESDIR}/README.FreeBSD.port ${STAGEDIR}${DOCSDIR}
${INSTALL_SCRIPT} ${FILESDIR}/Sophos.install.freebsd ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOC_FILES} ${STAGEDIR}${DOCSDIR}
@${REINPLACE_CMD} \
-e 's,%%LOCALBASE%%,${LOCALBASE},' \
-e 's,%%PREFIX%%,${PREFIX},' \
${STAGEDIR}${DOCSDIR}/Sophos.install.freebsd
@${RM} ${STAGEDIR}${DOCSDIR}/Sophos.install.freebsd.bak
.else
@${ECHO_MSG} -n ">> Installing manpage..."
.endif
(cd ${WRKSRC}/etc && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/etc)
(cd ${WRKSRC}/usr/sbin && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin)
(cd ${WRKSRC}/usr/share && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share)
cd ${WRKDIR} && \
${INSTALL_MAN} ${PORTNAME}.8 ${STAGEDIR}${PREFIX}/man/man8
${LN} -sf ${PREFIX}/man/man8/${PORTNAME}.8 \
${LN} -sf ${PORTNAME}.8 \
${STAGEDIR}${PREFIX}/man/man8/${PORTNAME:tl}.8
@${ECHO_MSG} " [DONE]"

View File

@ -1,2 +1,3 @@
SHA256 (MailScanner-4.85.2-3.tar.gz) = 8e2ca7be98199b226942a31dd48d4f516c9d86c1d402c5ade2858cbe104d2057
SIZE (MailScanner-4.85.2-3.tar.gz) = 924177
TIMESTAMP = 1487170129
SHA256 (MailScanner-5.0.3-7.nix.tar.gz) = e3de4f372e06001da818fbe8c540f66d3fa21543544abace7f1d805ff85ee0a8
SIZE (MailScanner-5.0.3-7.nix.tar.gz) = 604345

View File

@ -1,92 +0,0 @@
!%%LOCALBASE%%/bin/bash
#
# $Id: Sophos.install.freebsd,v 1.3 2004/01/31 23:43:16 sergei Exp $
#
# Run this script to install Sophos in the right place, with the right
# options for the MailScanner.
# Run this script from inside the directory in which you have copied
# and unpacked the Sophos distribution.
# Tweaked for FreeBSD.
SOPHOS=%%LOCALBASE%%/Sophos
SCRIPTS=%%PREFIX%%/libexec/MailScanner
COMPD=freebsd.elf.tar.Z
DISTRIB=freebsd.elf.tar
mkdir -p ${SOPHOS}
chown -R root ${SOPHOS}
chmod -R go+rX ${SOPHOS}
# Clear out any old libs from /usr/local/lib which is where
# a default SAVI installation will have left them
echo Clearing out old default Sophos installation libraries
rm -f %%LOCALBASE%%/lib/libsavi.so*
# Have we got to uncompress the distribution for them?
if [ -f $COMPD ]; then
echo Uncompressing Sophos distribution
uncompress $COMPD
fi
# Have we got to unpack the distribution for them?
if [ -f $DISTRIB ]; then
# Is there an old unpacked distribution here too??
if [ -d sav-install ]; then
echo Clearing out unpacked distribution
rm -rf sav-install
fi
# Unpack the distribution
echo Unpacking distribution
tar xBf $DISTRIB
fi
# JKF 31/08/2001 Remove any existing vdl.dat files
if [ -f ${SOPHOS}/lib/vdl.dat ]; then
rm -f ${SOPHOS}/lib/vdl*
fi
if [ -f ${SOPHOS}/lib/vdln.dat ]; then
rm -f ${SOPHOS}/lib/vdl*
fi
if [ -f ${SOPHOS}/lib/vdl01.vdb ]; then
rm -f ${SOPHOS}/lib/vdl*
fi
# Are we in the right directory, or one above it?
if [ -d sav-install ]; then
cd sav-install
fi
# Check we have found the install.sh script
if [ \! -f install.sh ]; then
echo Please cd into the directory containing the Sophos install.sh
echo script and run this command again.
exit 1
fi
echo Installing Sophos for MailScanner
./install.sh -v -d ${SOPHOS} -s lib -ni
if [ -f /etc/sav.conf ]; then
echo Removing troublesome and useless configuration file /etc/sav.conf
rm -f /etc/sav.conf
fi
echo Creating links so Perl-SAVI module compiles
[ -e ${SOPHOS}/lib/libsavi.so.2 ] && ln -sf libsavi.so.2 ${SOPHOS}/lib/libsavi.so
[ -e ${SOPHOS}/lib/libsavi.so.3 ] && ln -sf libsavi.so.3 ${SOPHOS}/lib/libsavi.so
echo
echo Fetching latest IDE virus identities from www.sophos.com
${SCRIPTS}/sophos-autoupdate
if [ -f ${SCRIPTS}/sophos-wrapper ]; then
chmod a=rx ${SCRIPTS}/sophos-wrapper
echo Done.
else
echo Something has gone wrong. There should be a copy of the
echo script sophos-wrapper in the directory ${SCRIPTS}.
echo Please re-install the MailScanner or fetch another copy of
echo sophoswrapper from the distribution web site.
fi
exit 0

View File

@ -1,12 +0,0 @@
--- lib/clamav-wrapper.orig 2015-12-04 06:27:18 UTC
+++ lib/clamav-wrapper
@@ -51,6 +51,9 @@
# You may want to check this script for bash-isms
++PATH=$PATH:/usr/local/bin
++export PATH
+
#TempDir="/tmp/clamav.$$"
TempDir=$(mktemp -t tmp) || { echo "$0: Cannot make name for temporary dir" >&2; exit 1; }
ClamUser="clamav"

View File

@ -1,79 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
DATADIR=%%DATADIR%%
ETC_FILES="%%ETC_FILES%%"
prune_lang_conf()
{
for LANG_DIR in ${DATADIR}/reports/*
do
for REPORT_FILE in ${LANG_DIR}/*.sample
do
cmp -s ${REPORT_FILE%.sample} ${REPORT_FILE} \
&& rm -f ${REPORT_FILE%.sample}
done
done
}
prune_wrappers()
{
for WRAPPER in ${PKG_PREFIX}/libexec/MailScanner/*-wrapper
do
cmp -s ${WRAPPER} ${WRAPPER}.sample \
&& rm -f ${WRAPPER}
done
}
prune_autoupdate()
{
for AUTOUPDATE in ${PKG_PREFIX}/libexec/MailScanner/*-autoupdate
do
cmp -s ${AUTOUPDATE} ${AUTOUPDATE}.sample \
&& rm -f ${AUTOUPDATE}
done
}
prune_rules()
{
for RULES in ${PKG_PREFIX}/etc/MailScanner/rules/*.rules
do
cmp -s ${RULES} ${RULES}.sample \
&& rm -f ${RULES}
done
}
prune_mcp()
{
for MCP_FILES in %%MCP_FILES%%
do
cmp -s ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}.sample \
${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES} \
&& rm -f ${PKG_PREFIX}/etc/MailScanner/mcp/${MCP_FILES}
done
}
prune_etc()
{
for ETC in ${ETC_FILES}
do
cmp -s ${PKG_PREFIX}/etc/MailScanner/${ETC}.sample \
${PKG_PREFIX}/etc/MailScanner/${ETC} \
&& rm -f ${PKG_PREFIX}/etc/MailScanner/${ETC}
done
}
case $2 in
DEINSTALL)
[ -L ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf ] \
&& rm -f ${PKG_PREFIX}/etc/mail/spamassassin/mailscanner.cf
prune_lang_conf
prune_wrappers
prune_autoupdate
prune_rules
prune_mcp
prune_etc
exit 0
;;
esac

View File

@ -23,9 +23,6 @@
Either create those directories or change the configuration.
Sophos users: Please take a look at the Sophos install
script %%PREFIX%%/share/doc/MailScanner/Sophos.install.freebsd
*****************************************************************
A new optional rc variable called mailscanner_user has been added
to the startup script. This is a temporary workaround to address

File diff suppressed because it is too large Load Diff