diff options
author | ijliao <ijliao@FreeBSD.org> | 2002-05-15 21:19:02 +0800 |
---|---|---|
committer | ijliao <ijliao@FreeBSD.org> | 2002-05-15 21:19:02 +0800 |
commit | 9085b9e0fd82e6f4ce69848b81f643715d423c07 (patch) | |
tree | c81f120e9df06f069865a881fddd573e752141a1 /security | |
parent | 5a724e22845cafdb84daad4745ca073af8dd72fe (diff) | |
download | freebsd-ports-gnome-9085b9e0fd82e6f4ce69848b81f643715d423c07.tar.gz freebsd-ports-gnome-9085b9e0fd82e6f4ce69848b81f643715d423c07.tar.zst freebsd-ports-gnome-9085b9e0fd82e6f4ce69848b81f643715d423c07.zip |
* fix a typo in /usr/local/etc/rc.d/amavisd.sh
* fix to use vscan:vscan to scan virus
* add a dependency of p5-Net-Telnet
PR: 38084
Submitted by: maintainer
Diffstat (limited to 'security')
-rw-r--r-- | security/amavisd/Makefile | 29 | ||||
-rw-r--r-- | security/amavisd/files/amavisd.sh (renamed from security/amavisd/files/amavisd.sh.sample) | 2 | ||||
-rw-r--r-- | security/amavisd/pkg-install | 39 | ||||
-rw-r--r-- | security/amavisd/pkg-plist | 2 |
4 files changed, 58 insertions, 14 deletions
diff --git a/security/amavisd/Makefile b/security/amavisd/Makefile index a75c29dad45b..949456bd2427 100644 --- a/security/amavisd/Makefile +++ b/security/amavisd/Makefile @@ -7,13 +7,14 @@ PORTNAME= amavisd PORTVERSION= 20020300 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://www.amavis.org/dist/perl/ DISTNAME= ${PORTNAME}-snapshot-${PORTVERSION} MAINTAINER= gslin@ccca.nctu.edu.tw -RUN_DEPENDS= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \ +BUILD_DEPENDS= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \ ${LOCALBASE}/bin/lha:${PORTSDIR}/archivers/lha \ ${LOCALBASE}/bin/unarj:${PORTSDIR}/archivers/unarj \ ${LOCALBASE}/bin/unrar:${PORTSDIR}/archivers/unrar \ @@ -27,42 +28,46 @@ RUN_DEPENDS= ${LOCALBASE}/bin/arc:${PORTSDIR}/archivers/arc \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Convert/TNEF.pm:${PORTSDIR}/converters/p5-Convert-TNEF \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/IO/AtomicFile.pm:${PORTSDIR}/devel/p5-IO-stringy \ ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/MIME/Body.pm:${PORTSDIR}/mail/p5-MIME-Tools \ - ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools + ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Mail/Address.pm:${PORTSDIR}/mail/p5-Mail-Tools \ + ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/Net/Telnet.pm:${PORTSDIR}/net/p5-Net-Telnet +RUN_DEPENDS= ${BUILD_DEPENDS} GNU_CONFIGURE= yes -AMAVISUSER?= root +AMAVISUSER?= vscan +AMAVISGROUP?= vscan -CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc --with-amavisuser=${AMAVISUSER} +CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc --with-amavisuser=${AMAVISUSER}:${AMAVISGROUP} .if defined(WITH_POSTFIX) CONFIGURE_ARGS+= --enable-postfix -RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix MTA?= postfix +RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix .elif defined(WITH_POSTFIX_CURRENT) CONFIGURE_ARGS+= --enable-postfix -RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix-current MTA?= postfix -.elif defined(WITH_QMAIL) -CONFIGURE_ARGS+= --enable-qmail -RUN_DEPENDS+= ${LOCALBASE}/bin/qmail-smtpd:${PORTSDIR}/mail/qmail -MTA?= qmail +RUN_DEPENDS+= ${LOCALBASE}/libexec/postfix/smtpd:${PORTSDIR}/mail/postfix-current .else CONFIGURE_ARGS+= --enable-sendmail MTA?= sendmail .endif post-patch: - @${SED} "s,%%AMAVISUSER%%,${AMAVISUSER}," ${FILESDIR}/amavisd.sh.sample > ${WRKSRC}/amavisd.sh.sample + @${SED} 's,%%AMAVISUSER%%,${AMAVISUSER},g' ${FILESDIR}/amavisd.sh > ${WRKSRC}/amavisd.sh + +pre-install: + @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${AMAVISUSER} ${AMAVISGROUP} post-install: - ${INSTALL_SCRIPT} ${WRKSRC}/amavisd.sh.sample ${PREFIX}/etc/rc.d + ${INSTALL_SCRIPT} ${WRKSRC}/amavisd.sh ${PREFIX}/etc/rc.d .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for FILE in FAQ INSTALL README README.exim README.milter README.postfix README.qmail README.scanners README.sendmail doc/amavis.html doc/amavis.m4 doc/amavis.png doc/amavis.txt ${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR} .endfor + @${ECHO} "===============================================================================" @${ECHO} "Please read ${DOCSDIR}/README.${MTA}" + @${ECHO} "===============================================================================" .endif .include <bsd.port.mk> diff --git a/security/amavisd/files/amavisd.sh.sample b/security/amavisd/files/amavisd.sh index b85e66323773..e09150d0b72e 100644 --- a/security/amavisd/files/amavisd.sh.sample +++ b/security/amavisd/files/amavisd.sh @@ -7,7 +7,7 @@ fi case "$1" in start) - [ -x ${PREFIX}/amavisd ] && su - %%AMAVISUSER%% -c ${PREFIX}/amavisd > /dev/null 2>&1 && echo -n ' amavisd' + [ -x ${PREFIX}/sbin/amavisd ] && su - %%AMAVISUSER%% -c ${PREFIX}/sbin/amavisd > /dev/null 2>&1 && echo -n ' amavisd' ;; stop) echo -n ' amavisd' diff --git a/security/amavisd/pkg-install b/security/amavisd/pkg-install new file mode 100644 index 000000000000..c35d566ffad0 --- /dev/null +++ b/security/amavisd/pkg-install @@ -0,0 +1,39 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +PKG_PREFIX=${PKG_PREFIX:=/usr/local} +BATCH=${BATCH:=no} + +USER=$1 +GROUP=$2 + +if /usr/sbin/pw groupshow "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." +else + if /usr/sbin/pw groupadd ${GROUP} -h - + then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + echo "Please create it, and try again." + exit 1 + fi +fi + +if /usr/sbin/pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." +else + if /usr/sbin/pw useradd ${USER} -g ${GROUP} -h - \ + -d /var/amavis \ + -s /bin/sh \ + -c "Scanning Virus Account" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + echo "Please create it, and try again." + exit 1 + fi +fi diff --git a/security/amavisd/pkg-plist b/security/amavisd/pkg-plist index 74bd09dcb176..e3f7975d8413 100644 --- a/security/amavisd/pkg-plist +++ b/security/amavisd/pkg-plist @@ -13,6 +13,6 @@ %%PORTDOCS%%share/doc/amavisd/amavis.txt %%PORTDOCS%%@dirrm share/doc/amavisd etc/amavisd.conf -etc/rc.d/amavisd.sh.sample +etc/rc.d/amavisd.sh sbin/amavis sbin/amavisd |