aboutsummaryrefslogtreecommitdiffstats
path: root/security/amavisd-new
diff options
context:
space:
mode:
authorflz <flz@FreeBSD.org>2005-07-06 16:47:09 +0800
committerflz <flz@FreeBSD.org>2005-07-06 16:47:09 +0800
commit0c8111b2f599d16d90f693569fb3f5ade67c87cc (patch)
treebb17918bd9f0e71999554cbb7589de509a379344 /security/amavisd-new
parent549c629238a473ea5522ee6c79260965149b927b (diff)
downloadfreebsd-ports-graphics-0c8111b2f599d16d90f693569fb3f5ade67c87cc.tar.gz
freebsd-ports-graphics-0c8111b2f599d16d90f693569fb3f5ade67c87cc.tar.zst
freebsd-ports-graphics-0c8111b2f599d16d90f693569fb3f5ade67c87cc.zip
- Update to 2.3.2.
- Use USE_RC_SUBR / USE_RCORDER for amavis.sh. - Use SUB_FILES / SUB_LIST for pkg-* files. - Add new MILTER option. - Probably some other fixes I've forgot. PR: ports/82423 Reported by: Petr Rehor <prehor@gmail.com> Submitted by: maintainer
Diffstat (limited to 'security/amavisd-new')
-rw-r--r--security/amavisd-new/Makefile63
-rw-r--r--security/amavisd-new/distinfo4
-rw-r--r--security/amavisd-new/files/amavis-milter.sh.in (renamed from security/amavisd-new/files/amavis-milter.sh.tmpl)6
-rw-r--r--security/amavisd-new/files/amavisd.sh.in (renamed from security/amavisd-new/files/amavisd.sh.tmpl)7
-rw-r--r--security/amavisd-new/files/patch-amavisd-agent11
-rw-r--r--security/amavisd-new/files/pkg-deinstall.in (renamed from security/amavisd-new/files/DEINSTALL.tmpl)2
-rw-r--r--security/amavisd-new/files/pkg-install.in (renamed from security/amavisd-new/files/INSTALL.tmpl)2
-rw-r--r--security/amavisd-new/files/pkg-message.in (renamed from security/amavisd-new/files/MESSAGE.tmpl)0
-rw-r--r--security/amavisd-new/pkg-plist8
9 files changed, 63 insertions, 40 deletions
diff --git a/security/amavisd-new/Makefile b/security/amavisd-new/Makefile
index d1d88e69cdf..656c167a0d5 100644
--- a/security/amavisd-new/Makefile
+++ b/security/amavisd-new/Makefile
@@ -7,7 +7,7 @@
# Based on amavisd ports makefile.
PORTNAME= amavisd-new
-PORTVERSION= 2.3.1
+PORTVERSION= 2.3.2
PORTEPOCH= 1
CATEGORIES= security
MASTER_SITES= http://www.ijs.si/software/amavisd/ \
@@ -39,11 +39,6 @@ RUN_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/Unix/Syslog.pm:${PORTSDIR}/sysutils/p5-Un
${LOCALBASE}/bin/rpm2cpio.pl:${PORTSDIR}/archivers/rpm2cpio
USE_PERL5_RUN= yes
-USE_RC_SUBR= yes
-
-PKGINSTALL= ${WRKDIR}/INSTALL
-PKGDEINSTALL= ${WRKDIR}/DEINSTALL
-PKGMESSAGE= ${WRKDIR}/MESSAGE
AMAVISUSER?= vscan
AMAVISGROUP?= vscan
@@ -54,17 +49,45 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:C/\.p.+//}
OPTIONS= MYSQL "MySQL support" off \
PGSQL "PgSQL support" off \
- LDAP "LDAP support" off
+ LDAP "LDAP support" off \
+ MILTER "sendmail milter support" on
+
+SUB_FILES= pkg-install pkg-deinstall pkg-message
+
+SUB_LIST= AMAVISUSER=${AMAVISUSER} \
+ AMAVISGROUP=${AMAVISGROUP} \
+ AMAVISDIR=${AMAVISDIR} \
+ AMAVISQUARANTINE=${AMAVISQUARANTINE} \
+ DOCSDIR=${DOCSDIR}
.include <bsd.port.pre.mk>
+.if ${OSVERSION} >= 500037
+USE_RCORDER= amavisd.sh
+RC_DIR= /etc/rc.d
+RC_SUFX=
+.else
+USE_RC_SUBR+= amavisd.sh
+RC_DIR= ${PREFIX}/etc/rc.d
+RC_SUFX= .sh
+.endif
+
.if !exists(/usr/lib/libmilter.a) && !exists(${PREFIX}/lib/libmilter.a)
+AMAVIS_NOAMAVIS="@comment "
+.endif
+
+.if defined(WITH_MILTER) && !defined(AMAVIS_NOAMAVIS)
+USE_RCORDER+= amavis-milter.sh
+.else
AMAVIS_NOMILTER="@comment "
.endif
-PLIST_SUB+= AMAVIS_NOMILTER=${AMAVIS_NOMILTER}
+PLIST_SUB+= AMAVIS_NOMILTER=${AMAVIS_NOMILTER} \
+ AMAVIS_NOAMAVIS=${AMAVIS_NOAMAVIS} \
+ RC_DIR=${RC_DIR} \
+ RC_SUFX=${RC_SUFX}
-.if defined(AMAVIS_NOMILTER)
+.if defined(AMAVIS_NOAMAVIS)
do-build:
@${ECHO} libmilter not available, not building amavis-milter and amavis
.else
@@ -74,13 +97,7 @@ CONFIGURE_WRKSRC= ${WRKSRC}/helper-progs
BUILD_WRKSRC= ${WRKSRC}/helper-progs
.endif
-SED_SCRIPT= -e 's,%%AMAVISUSER%%,${AMAVISUSER},g' \
- -e 's,%%AMAVISGROUP%%,${AMAVISGROUP},g' \
- -e 's,%%AMAVISDIR%%,${AMAVISDIR},g' \
- -e 's,%%AMAVISQUARANTINE%%,${AMAVISQUARANTINE},g' \
- -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
- -e 's,%%PREFIX%%,${PREFIX},g' \
- -e 's,%%RC_SUBR%%,${RC_SUBR},g'
+SED_SCRIPT= ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/}
.if defined(WITH_MYSQL)
RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
@@ -94,11 +111,8 @@ RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-P
RUN_DEPENDS+= ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap
.endif
-pre-build:
- for f in amavisd.sh amavis-milter.sh INSTALL DEINSTALL MESSAGE; do \
- ${SED} ${SED_SCRIPT} < ${FILESDIR}/$${f}.tmpl > ${WRKDIR}/$${f}; \
- done
- for f in amavisd.conf amavisd.conf-sample amavisd amavisd-nanny; do \
+post-patch:
+ @for f in amavisd.conf amavisd.conf-sample amavisd amavisd-agent amavisd-nanny; do \
${SED} ${SED_SCRIPT} < ${WRKSRC}/$${f} > ${WRKDIR}/$${f}; \
done
@@ -106,12 +120,14 @@ pre-install:
@${SH} ${PKGINSTALL} ${DISTNAME} PRE-INSTALL
do-install:
-.if !defined(AMAVIS_NOMILTER)
+.if !defined(AMAVIS_NOAMAVIS)
${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis ${PREFIX}/sbin
+.endif
+.if !defined(AMAVIS_NOMILTER)
${INSTALL_PROGRAM} ${WRKSRC}/helper-progs/amavis-milter ${PREFIX}/sbin
- ${INSTALL_SCRIPT} ${WRKDIR}/amavis-milter.sh ${PREFIX}/etc/rc.d
.endif
${INSTALL_SCRIPT} ${WRKDIR}/amavisd ${PREFIX}/sbin
+ ${INSTALL_SCRIPT} ${WRKDIR}/amavisd-agent ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKDIR}/amavisd-nanny ${PREFIX}/sbin
${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf ${PREFIX}/etc/amavisd.conf-dist
.if !exists(${PREFIX}/etc/amavisd.conf)
@@ -119,7 +135,6 @@ do-install:
.endif
${INSTALL_SCRIPT} ${WRKDIR}/amavisd.conf-sample ${PREFIX}/etc/amavisd.conf-sample
${INSTALL_SCRIPT} ${WRKSRC}/amavisd.conf-default ${PREFIX}/etc/amavisd.conf-default
- ${INSTALL_SCRIPT} ${WRKDIR}/amavisd.sh ${PREFIX}/etc/rc.d
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in AAAREADME.first INSTALL LDAP.schema LICENSE RELEASE_NOTES README_FILES/*
diff --git a/security/amavisd-new/distinfo b/security/amavisd-new/distinfo
index 926f352e987..23294dc2707 100644
--- a/security/amavisd-new/distinfo
+++ b/security/amavisd-new/distinfo
@@ -1,2 +1,2 @@
-MD5 (amavisd-new-2.3.1.tar.gz) = 5260e01b6ec94b66dc9160ce7bbb8ebc
-SIZE (amavisd-new-2.3.1.tar.gz) = 780829
+MD5 (amavisd-new-2.3.2.tar.gz) = 4af47f7e0b2aaf71bd5783dc26a576a8
+SIZE (amavisd-new-2.3.2.tar.gz) = 786156
diff --git a/security/amavisd-new/files/amavis-milter.sh.tmpl b/security/amavisd-new/files/amavis-milter.sh.in
index 73bd248ce0e..180d515b2d9 100644
--- a/security/amavisd-new/files/amavis-milter.sh.tmpl
+++ b/security/amavisd-new/files/amavis-milter.sh.in
@@ -5,7 +5,7 @@
# PROVIDE: amavis_milter
# REQUIRE: amavisd
-# BEFORE: amavisd
+# BEFORE: mail
# KEYWORD: FreeBSD shutdown
#
@@ -20,15 +20,13 @@ name=amavis_milter
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/amavis-milter
-
-amavis_milter_user=%%AMAVISUSER%%
-
required_files=%%PREFIX%%/etc/amavisd.conf
# set defaults
amavis_milter_enable=${amavis_milter_enable:-"NO"}
amavis_milter_flags=${amavis_milter_flags:-"-D -p %%AMAVISDIR%%/amavis-milter.sock"}
+amavis_milter_user=${amavis_milter_user:-"%%AMAVISUSER%%"}
load_rc_config $name
run_rc_command "$1"
diff --git a/security/amavisd-new/files/amavisd.sh.tmpl b/security/amavisd-new/files/amavisd.sh.in
index 58b1a49c570..3f0da9c2472 100644
--- a/security/amavisd-new/files/amavisd.sh.tmpl
+++ b/security/amavisd-new/files/amavisd.sh.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/amavisd.sh.tmpl,v 1.7 2004-07-18 10:05:50 vanilla Exp $
+# $FreeBSD$
#
# PROVIDE: amavisd
@@ -20,9 +20,6 @@ name=amavisd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/amavisd > /dev/null 2>&1
-
-amavisd_flags="-u %%AMAVISUSER%%"
-
pidfile=%%AMAVISDIR%%/amavisd.pid
required_files=%%PREFIX%%/etc/amavisd.conf
@@ -36,7 +33,7 @@ stop_postcmd()
# set defaults
amavisd_enable=${amavisd_enable:-"NO"}
-amavisd_flags=${amavisd_flags:-""}
+amavisd_flags=${amavisd_flags:-"-u %%AMAVISUSER%%"}
load_rc_config $name
run_rc_command "$1"
diff --git a/security/amavisd-new/files/patch-amavisd-agent b/security/amavisd-new/files/patch-amavisd-agent
new file mode 100644
index 00000000000..c73160b1af3
--- /dev/null
+++ b/security/amavisd-new/files/patch-amavisd-agent
@@ -0,0 +1,11 @@
+--- amavisd-agent.orig Sun Jun 19 18:26:43 2005
++++ amavisd-agent Sun Jun 19 18:28:04 2005
+@@ -107,7 +107,7 @@
+ # main program starts here
+ $SIG{INT} = sub { die "\n" }; # do the END code block
+ my($env) = BerkeleyDB::Env->new(
+- '-Home'=>'/var/amavis/db', '-Flags'=> DB_INIT_CDB | DB_INIT_MPOOL);
++ '-Home'=>'%%AMAVISDIR%%/db', '-Flags'=> DB_INIT_CDB | DB_INIT_MPOOL);
+ defined $env or die "BDB no env: $BerkeleyDB::Error $!";
+ my($db) = BerkeleyDB::Hash->new(
+ '-Filename'=>'snmp.db', '-Flags'=>DB_RDONLY, '-Env'=>$env );
diff --git a/security/amavisd-new/files/DEINSTALL.tmpl b/security/amavisd-new/files/pkg-deinstall.in
index 7f0bf9ea0cc..8c3c4d8fde4 100644
--- a/security/amavisd-new/files/DEINSTALL.tmpl
+++ b/security/amavisd-new/files/pkg-deinstall.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/DEINSTALL.tmpl,v 1.3 2003-04-20 10:02:44 leeym Exp $
+# $FreeBSD$
#
USER=%%AMAVISUSER%%
diff --git a/security/amavisd-new/files/INSTALL.tmpl b/security/amavisd-new/files/pkg-install.in
index 276fc401077..fedfae9bd4a 100644
--- a/security/amavisd-new/files/INSTALL.tmpl
+++ b/security/amavisd-new/files/pkg-install.in
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/amavisd-new/files/Attic/INSTALL.tmpl,v 1.6 2005-02-14 03:51:45 leeym Exp $
+# $FreeBSD$
#
USER=%%AMAVISUSER%%
diff --git a/security/amavisd-new/files/MESSAGE.tmpl b/security/amavisd-new/files/pkg-message.in
index 8900f708371..8900f708371 100644
--- a/security/amavisd-new/files/MESSAGE.tmpl
+++ b/security/amavisd-new/files/pkg-message.in
diff --git a/security/amavisd-new/pkg-plist b/security/amavisd-new/pkg-plist
index 0de0824a927..0ac24359ebc 100644
--- a/security/amavisd-new/pkg-plist
+++ b/security/amavisd-new/pkg-plist
@@ -1,3 +1,6 @@
+@comment $FreeBSD$
+%%AMAVIS_NOMILTER%%@unexec %%RC_DIR%%/amavis-milter%%RC_SUFX%% stop > /dev/null 2>&1 || true
+@unexec %%RC_DIR%%/amavisd%%RC_SUFX%% stop > /dev/null 2>&1 || true
%%PORTDOCS%%%%DOCSDIR%%/AAAREADME.first
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
%%PORTDOCS%%%%DOCSDIR%%/LDAP.schema
@@ -30,9 +33,8 @@ etc/amavisd.conf-default
etc/amavisd.conf-dist
@exec [ ! -f %B/amavisd.conf ] && cp %B/%f %B/amavisd.conf
etc/amavisd.conf-sample
-%%AMAVIS_NOMILTER%%etc/rc.d/amavis-milter.sh
-etc/rc.d/amavisd.sh
-%%AMAVIS_NOMILTER%%sbin/amavis
+%%AMAVIS_NOAMAVIS%%sbin/amavis
%%AMAVIS_NOMILTER%%sbin/amavis-milter
sbin/amavisd
+sbin/amavisd-agent
sbin/amavisd-nanny