aboutsummaryrefslogtreecommitdiff
path: root/mail/milter-regex
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2013-11-13 06:31:00 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2013-11-13 06:31:00 +0000
commitf2b2c6aa1d179e1a93c08a30f6a381d877e573dd (patch)
tree7b5d06641b64ff0b7bf6a576879858297a9741f1 /mail/milter-regex
parent8235c724b477a4feb1a019982c8ba82494647e80 (diff)
downloadports-f2b2c6aa1d179e1a93c08a30f6a381d877e573dd.tar.gz
ports-f2b2c6aa1d179e1a93c08a30f6a381d877e573dd.zip
Notes
Diffstat (limited to 'mail/milter-regex')
-rw-r--r--mail/milter-regex/Makefile17
-rw-r--r--mail/milter-regex/files/milterregex.in9
-rw-r--r--mail/milter-regex/pkg-plist4
3 files changed, 16 insertions, 14 deletions
diff --git a/mail/milter-regex/Makefile b/mail/milter-regex/Makefile
index 576c33694cfe..5cd8d10f1015 100644
--- a/mail/milter-regex/Makefile
+++ b/mail/milter-regex/Makefile
@@ -12,14 +12,13 @@ COMMENT= Milter plugin to sendmail for regular expression filtering
LICENSE= BSD
LICENSE_FILE= ${FILESDIR}/COPYRIGHT
-NO_STAGE= yes
+USE_RC_SUBR= milterregex
+SUB_LIST= SPOOLDIR=${SPOOLDIR}
+PLIST_SUB= SPOOLDIR=${SPOOLDIR}
+PLIST_FILES= libexec/milter-regex man/man8/milter-regex.8.gz
MAILUSER?= mailnull
-MAN8= milter-regex.8
-PLIST_FILES= libexec/milter-regex
-USE_RC_SUBR= milterregex
SPOOLDIR?= /var/run/milter-regex
-SUB_LIST= SPOOLDIR=${SPOOLDIR}
.include <bsd.port.pre.mk>
@@ -40,11 +39,7 @@ post-patch:
s/-Werror//g" ${WRKSRC}/Makefile
do-install:
- @${INSTALL_PROGRAM} ${WRKSRC}/milter-regex ${PREFIX}/libexec
- @${INSTALL_MAN} ${WRKSRC}/milter-regex.8 ${PREFIX}/man/man8
- @${INSTALL} -d -o ${MAILUSER} -g daemon -m 0700 ${SPOOLDIR}
-
-post-install:
- @${CAT} ${PKGMESSAGE}
+ ${INSTALL_PROGRAM} ${WRKSRC}/milter-regex ${STAGEDIR}${PREFIX}/libexec/
+ ${INSTALL_MAN} ${WRKSRC}/milter-regex.8 ${STAGEDIR}${MANPREFIX}/man/man8/
.include <bsd.port.post.mk>
diff --git a/mail/milter-regex/files/milterregex.in b/mail/milter-regex/files/milterregex.in
index de4ef12fa921..5d5e26805ffe 100644
--- a/mail/milter-regex/files/milterregex.in
+++ b/mail/milter-regex/files/milterregex.in
@@ -29,8 +29,17 @@ rcvar="milterregex_enable"
command="%%PREFIX%%/libexec/milter-regex"
pidfile="${spooldir}/milter-regex.pid"
required_files="%%PREFIX%%/etc/milter-regex.conf"
+start_precmd="milterregex_prestart"
stop_postcmd="milterregex_poststop"
+milterregex_prestart() {
+ if test ! -d "${spooldir}"
+ then
+ mkdir -m 700 -p "${spooldir}"
+ chown mailnull:daemon "${spooldir}"
+ fi
+}
+
milterregex_poststop() {
/bin/rm -f ${pidfile}
}
diff --git a/mail/milter-regex/pkg-plist b/mail/milter-regex/pkg-plist
index 10a124d09624..bafa3fb46c92 100644
--- a/mail/milter-regex/pkg-plist
+++ b/mail/milter-regex/pkg-plist
@@ -1,5 +1,3 @@
-@exec mkdir -m 700 -p /var/run/milter-regex
-@exec chown mailnull:daemon /var/run/milter-regex
@cwd /
-@dirrmtry /var/run/milter-regex
+@dirrmtry %%SPOOLDIR%%
@cwd