- Add some missing RUN_DEPENDS

- Change Makefile to adjust a two more scripts to use FreeBSD paths
- Added additional install (Sophos)

PR:		61132
Submitted by:	maintainer
This commit is contained in:
Sergei Kolobov 2004-01-09 17:45:42 +00:00
parent 1fceb88774
commit 22a69799fa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=97790
6 changed files with 222 additions and 10 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= MailScanner
PORTVERSION= 4.25.14
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= mail
MASTER_SITES= http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/
DISTNAME= MailScanner-${PORTVERSION:C/\.([0-9]+)$/-\1/}
@ -24,11 +24,13 @@ BUILD_DEPENDS= \
${SITE_PERL}/MIME/Parser.pm:${PORTSDIR}/mail/p5-MIME-Tools \
${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp \
${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \
${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net/p5-Net-CIDR
${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net/p5-Net-CIDR
RUN_DEPENDS= ${BUILD_DEPENDS} \
${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash2 \
${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef
${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef \
${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \
${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
CONFLICTS= MailScanner-devel-*
@ -79,8 +81,17 @@ do-build:
s,/opt/MailScanner/etc/reports,${DATADIR}/reports,g; \
s,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g;' \
${WRKSRC}/lib/MailScanner/ConfigDefs.pl
${PERL} -pi \
-e 's,/bin/sed,/usr/bin/sed,g;' ${WRKSRC}/lib/MailScanner/SystemDefs.pm
${PERL} -pi -e \
's,/bin/sed,/usr/bin/sed,g;' ${WRKSRC}/lib/MailScanner/SystemDefs.pm
${PERL} -pi -e \
's,/usr/bin/clamscan,${LOCALBASE}/bin/clamscan,g;' \
${WRKSRC}/lib/clamav-wrapper
${PERL} -pi -e \
's,/usr/bin/wget,${LOCALBASE}/bin/wget,g;' \
${WRKSRC}/lib/sophos-autoupdate
${PERL} -pi -e \
's,/usr/bin/unzip,${LOCALBASE}/bin/unzip,g;' \
${WRKSRC}/lib/sophos-autoupdate
do-install:
#
@ -148,6 +159,8 @@ do-install:
cd ${WRKSRC}/docs/man && \
${INSTALL_MAN} ${MAN5} ${MAN5PREFIX}/man/man5 && \
${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/man8
# Sophos install script
${INSTALL_SCRIPT} ${FILESDIR}/Sophos.install.freebsd ${DOCSDIR}
.if exists(${PREFIX}/etc/MailScanner/MailScanner.conf)
# Upgrading MailScanner.conf file... Please wait
@${WRKSRC}/bin/upgrade_MailScanner_conf \

View file

@ -0,0 +1,92 @@
#!/usr/local/bin/bash
#
# $Id: Sophos.install,v 1.13.2.3 2003/06/07 17:20:39 jkf 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=/usr/local/Sophos
SCRIPTS=/usr/local/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 /usr/local/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

@ -380,6 +380,7 @@ libexec/MailScanner/update_virus_scanners
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD.port
%%PORTDOCS%%%%DOCSDIR%%/README.sql-logging
%%PORTDOCS%%%%DOCSDIR%%/Sophos.install.freebsd
%%PORTDOCS%%%%DOCSDIR%%/building.txt
%%PORTDOCS%%%%DOCSDIR%%/donations.shtml
%%PORTDOCS%%%%DOCSDIR%%/downloadgraphs.shtml

View file

@ -7,7 +7,7 @@
PORTNAME= MailScanner
PORTVERSION= 4.25.14
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= mail
MASTER_SITES= http://www.sng.ecs.soton.ac.uk/mailscanner/files/4/tar/
DISTNAME= MailScanner-${PORTVERSION:C/\.([0-9]+)$/-\1/}
@ -24,11 +24,13 @@ BUILD_DEPENDS= \
${SITE_PERL}/MIME/Parser.pm:${PORTSDIR}/mail/p5-MIME-Tools \
${SITE_PERL}/File/Temp.pm:${PORTSDIR}/devel/p5-File-Temp \
${SITE_PERL}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \
${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net/p5-Net-CIDR
${SITE_PERL}/Net/CIDR.pm:${PORTSDIR}/net/p5-Net-CIDR
RUN_DEPENDS= ${BUILD_DEPENDS} \
${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash2 \
${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef
${LOCALBASE}/bin/tnef:${PORTSDIR}/converters/tnef \
${LOCALBASE}/bin/wget:${PORTSDIR}/ftp/wget \
${LOCALBASE}/bin/unzip:${PORTSDIR}/archivers/unzip
CONFLICTS= MailScanner-devel-*
@ -79,8 +81,17 @@ do-build:
s,/opt/MailScanner/etc/reports,${DATADIR}/reports,g; \
s,/opt/MailScanner/etc,${PREFIX}/etc/MailScanner,g;' \
${WRKSRC}/lib/MailScanner/ConfigDefs.pl
${PERL} -pi \
-e 's,/bin/sed,/usr/bin/sed,g;' ${WRKSRC}/lib/MailScanner/SystemDefs.pm
${PERL} -pi -e \
's,/bin/sed,/usr/bin/sed,g;' ${WRKSRC}/lib/MailScanner/SystemDefs.pm
${PERL} -pi -e \
's,/usr/bin/clamscan,${LOCALBASE}/bin/clamscan,g;' \
${WRKSRC}/lib/clamav-wrapper
${PERL} -pi -e \
's,/usr/bin/wget,${LOCALBASE}/bin/wget,g;' \
${WRKSRC}/lib/sophos-autoupdate
${PERL} -pi -e \
's,/usr/bin/unzip,${LOCALBASE}/bin/unzip,g;' \
${WRKSRC}/lib/sophos-autoupdate
do-install:
#
@ -148,6 +159,8 @@ do-install:
cd ${WRKSRC}/docs/man && \
${INSTALL_MAN} ${MAN5} ${MAN5PREFIX}/man/man5 && \
${INSTALL_MAN} ${MAN8} ${MAN8PREFIX}/man/man8
# Sophos install script
${INSTALL_SCRIPT} ${FILESDIR}/Sophos.install.freebsd ${DOCSDIR}
.if exists(${PREFIX}/etc/MailScanner/MailScanner.conf)
# Upgrading MailScanner.conf file... Please wait
@${WRKSRC}/bin/upgrade_MailScanner_conf \

View file

@ -0,0 +1,92 @@
#!/usr/local/bin/bash
#
# $Id: Sophos.install,v 1.13.2.3 2003/06/07 17:20:39 jkf 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=/usr/local/Sophos
SCRIPTS=/usr/local/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 /usr/local/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

@ -380,6 +380,7 @@ libexec/MailScanner/update_virus_scanners
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD.port
%%PORTDOCS%%%%DOCSDIR%%/README.sql-logging
%%PORTDOCS%%%%DOCSDIR%%/Sophos.install.freebsd
%%PORTDOCS%%%%DOCSDIR%%/building.txt
%%PORTDOCS%%%%DOCSDIR%%/donations.shtml
%%PORTDOCS%%%%DOCSDIR%%/downloadgraphs.shtml