mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-06 06:30:19 +00:00
Stageify and move state directory to /var/run/amavis.
PR: 187101 Submitted by: maintainer (with changes)
This commit is contained in:
parent
5d892c2d37
commit
0576e8db70
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=359429
@ -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>
|
||||
|
@ -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"
|
||||
|
||||
|
8
security/amavisd-milter/pkg-plist
Normal file
8
security/amavisd-milter/pkg-plist
Normal file
@ -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%%
|
Loading…
Reference in New Issue
Block a user