From 0576e8db70c5146de829e5bb6167850508681cda Mon Sep 17 00:00:00 2001 From: Xin LI Date: Fri, 27 Jun 2014 01:31:51 +0000 Subject: Stageify and move state directory to /var/run/amavis. PR: 187101 Submitted by: maintainer (with changes) --- security/amavisd-milter/Makefile | 31 +++++++++++-------------- security/amavisd-milter/files/amavisd-milter.in | 7 +++--- security/amavisd-milter/files/pkg-message.in | 12 ---------- security/amavisd-milter/pkg-message | 12 ++++++++++ security/amavisd-milter/pkg-plist | 8 +++++++ 5 files changed, 38 insertions(+), 32 deletions(-) delete mode 100644 security/amavisd-milter/files/pkg-message.in create mode 100644 security/amavisd-milter/pkg-message create mode 100644 security/amavisd-milter/pkg-plist (limited to 'security/amavisd-milter') 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 +# Created by: Petr Rehor # $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 .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 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/files/pkg-message.in deleted file mode 100644 index ee9313927660..000000000000 --- a/security/amavisd-milter/files/pkg-message.in +++ /dev/null @@ -1,12 +0,0 @@ - -******************************************************************* - - To configure amavisd-milter, sendmail and amavisd-new point - your browser to http://amavisd-milter.sourceforge.net - - Enable amavisd-milter in /etc/rc.conf with the following line: - - amavisd_milter_enable="YES" - -******************************************************************* - diff --git a/security/amavisd-milter/pkg-message b/security/amavisd-milter/pkg-message new file mode 100644 index 000000000000..ee9313927660 --- /dev/null +++ b/security/amavisd-milter/pkg-message @@ -0,0 +1,12 @@ + +******************************************************************* + + To configure amavisd-milter, sendmail and amavisd-new point + your browser to http://amavisd-milter.sourceforge.net + + Enable amavisd-milter in /etc/rc.conf with the following line: + + amavisd_milter_enable="YES" + +******************************************************************* + 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%% -- cgit v1.2.3