aboutsummaryrefslogtreecommitdiff
path: root/security/amavisd-milter
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-06-27 01:31:51 +0000
committerXin LI <delphij@FreeBSD.org>2014-06-27 01:31:51 +0000
commit0576e8db70c5146de829e5bb6167850508681cda (patch)
tree0d425004c40260ce282d8c4305f82836a3b70d39 /security/amavisd-milter
parent5d892c2d371403619171342bb10a284f08550472 (diff)
downloadports-0576e8db70c5146de829e5bb6167850508681cda.tar.gz
ports-0576e8db70c5146de829e5bb6167850508681cda.zip
Stageify and move state directory to /var/run/amavis.
PR: 187101 Submitted by: maintainer (with changes)
Notes
Notes: svn path=/head/; revision=359429
Diffstat (limited to 'security/amavisd-milter')
-rw-r--r--security/amavisd-milter/Makefile31
-rw-r--r--security/amavisd-milter/files/amavisd-milter.in7
-rw-r--r--security/amavisd-milter/pkg-message (renamed from security/amavisd-milter/files/pkg-message.in)0
-rw-r--r--security/amavisd-milter/pkg-plist8
4 files changed, 26 insertions, 20 deletions
diff --git a/security/amavisd-milter/Makefile b/security/amavisd-milter/Makefile
index bc99c6c1edee..c45f0a93da29 100644
--- a/security/amavisd-milter/Makefile
+++ b/security/amavisd-milter/Makefile
@@ -1,12 +1,13 @@
-# Created by: Petr Rehor <prehor@gmail.com>
+# Created by: Petr Rehor <rx@rx.cz>
# $FreeBSD$
PORTNAME= amavisd-milter
PORTVERSION= 1.6.0
+PORTREVISION= 1
CATEGORIES= security mail
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
-MAINTAINER= prehor@gmail.com
+MAINTAINER= rx@rx.cz
COMMENT= Milter for amavisd-new
RUN_DEPENDS= amavisd:${PORTSDIR}/security/amavisd-new
@@ -24,25 +25,23 @@ RUN_DEPENDS= amavisd:${PORTSDIR}/security/amavisd-new
# Shared defaults with security/amavisd-new
AMAVISUSER?= vscan
+AMAVISGROUP?= vscan
AMAVISDIR?= /var/amavis
+RUNDIR= /var/run/amavis
+
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --localstatedir=${AMAVISDIR} --with-working-dir=tmp
+CONFIGURE_ARGS= --localstatedir=${RUNDIR} --with-working-dir=tmp
USE_RC_SUBR= ${PORTNAME}
-SUB_FILES= pkg-message
SUB_LIST= AMAVISUSER=${AMAVISUSER} \
- AMAVISDIR=${AMAVISDIR}
+ AMAVISGROUP=${AMAVISGROUP} \
+ AMAVISDIR=${AMAVISDIR} \
+ RUNDIR=${RUNDIR}
+PLIST_SUB= ${SUB_LIST}
PORTDOCS= AUTHORS CHANGES INSTALL LICENSE README TODO
-NO_STAGE= yes
-PLIST_FILES= sbin/amavisd-milter
-PLIST_SUB= RC_DIR=${RC_DIR} \
- RC_SUFX=${RC_SUFX}
-
-MAN8= amavisd-milter.8
-
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/mail/sendmail/bsd.milter.mk"
@@ -72,12 +71,10 @@ CONFIGURE_ARGS+=--enable-debug
.endif
post-install:
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
.for f in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${STAGEDIR}${DOCSDIR}
.endfor
-.endif
- @${CAT} ${PKGMESSAGE}
+ ${INSTALL} -d -o ${AMAVISUSER} -g ${AMAVISGROUP} -m 755 ${STAGEDIR}${RUNDIR}
.include <bsd.port.post.mk>
diff --git a/security/amavisd-milter/files/amavisd-milter.in b/security/amavisd-milter/files/amavisd-milter.in
index 546220cc1cf3..bb53c6ed8f50 100644
--- a/security/amavisd-milter/files/amavisd-milter.in
+++ b/security/amavisd-milter/files/amavisd-milter.in
@@ -25,12 +25,13 @@ load_rc_config $name
# Set defaults
: ${amavisd_milter_enable:="NO"}
: ${amavisd_milter_user="%%AMAVISUSER%%"}
-: ${amavisd_milter_socket:="%%AMAVISDIR%%/amavisd-milter.sock"}
+: ${amavisd_milter_socket:="%%RUNDIR%%/amavisd-milter.sock"}
: ${amavisd_milter_socket_perm:="0666"}
+: ${amavisd_am_pdp_socket:="%%AMAVISDIR%%/amavisd.sock"}
-pidfile="${amavisd_milter_pidfile:-%%AMAVISDIR%%/amavisd-milter.pid}"
+pidfile="${amavisd_milter_pidfile:-%%RUNDIR%%/amavisd-milter.pid}"
command="%%PREFIX%%/sbin/amavisd-milter"
-command_args="-p ${pidfile} -s ${amavisd_milter_socket}"
+command_args="-p ${pidfile} -s ${amavisd_milter_socket} -S ${amavisd_am_pdp_socket}"
required_files="%%PREFIX%%/etc/amavisd.conf"
start_postcmd="amavisd_milter_postcmd"
diff --git a/security/amavisd-milter/files/pkg-message.in b/security/amavisd-milter/pkg-message
index ee9313927660..ee9313927660 100644
--- a/security/amavisd-milter/files/pkg-message.in
+++ b/security/amavisd-milter/pkg-message
diff --git a/security/amavisd-milter/pkg-plist b/security/amavisd-milter/pkg-plist
new file mode 100644
index 000000000000..38db3d5a3394
--- /dev/null
+++ b/security/amavisd-milter/pkg-plist
@@ -0,0 +1,8 @@
+@unexec if service amavisd-milter status | grep -q "amavisd-milter is running"; then service amavisd-milter stop; fi
+sbin/amavisd-milter
+man/man8/amavisd-milter.8.gz
+@mode 755
+@owner %%AMAVISUSER%%
+@group %%AMAVISGROUP%%
+@dirrmtry %%RUNDIR%%
+@exec install -d -o %%AMAVISUSER%% -g %%AMAVISGROUP%% -m 755 %%RUNDIR%%