summaryrefslogtreecommitdiff
path: root/mail/milter-regex
diff options
context:
space:
mode:
Diffstat (limited to 'mail/milter-regex')
-rw-r--r--mail/milter-regex/Makefile24
-rw-r--r--mail/milter-regex/PLIST3
-rw-r--r--mail/milter-regex/distinfo8
-rw-r--r--mail/milter-regex/files/milter-regex.sh44
4 files changed, 71 insertions, 8 deletions
diff --git a/mail/milter-regex/Makefile b/mail/milter-regex/Makefile
index e9269bc0d6b..5dbfca40f9d 100644
--- a/mail/milter-regex/Makefile
+++ b/mail/milter-regex/Makefile
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.10 2005/06/16 06:58:03 jlam Exp $
-#
+# $NetBSD: Makefile,v 1.11 2006/03/08 22:01:21 tron Exp $
-DISTNAME= milter-regex-1.5
+DISTNAME= milter-regex-1.6
CATEGORIES= mail
MASTER_SITES= http://www.benzedrine.cx/
@@ -11,6 +10,25 @@ COMMENT= Milter enabling regular expression filtering
INSTALLATION_DIRS= man/man8 sbin
+PKG_GROUPS= smmsp
+PKG_USERS= smmsp:smmsp::Sendmail\ Message\ Submission\ Program
+RCD_SCRIPTS= milter-regex
+
+SUBST_CLASSES+= etc
+SUBST_STAGE.etc= do-configure
+SUBST_FILES.etc= milter-regex.8 milter-regex.c
+SUBST_SED.etc= -e 's|/etc|${PKG_SYSCONFDIR}|g'
+
+SUBST_CLASSES+= var
+SUBST_STAGE.var= do-configure
+SUBST_FILES.var= milter-regex.8 milter-regex.c
+SUBST_SED.var= -e 's|/var/spool|${VARBASE}|g'
+
+# Work arround to avoid naming clash between the source directory
+# and our "rc.d" script.
+post-extract:
+ ${MV} ${WRKDIR}/${PKGBASE} ${WRKSRC}
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/milter-regex ${PREFIX}/sbin
${INSTALL_DATA} ${WRKSRC}/milter-regex.8 ${PREFIX}/man/man8
diff --git a/mail/milter-regex/PLIST b/mail/milter-regex/PLIST
index a5eacbb91cb..16cdbe57b3c 100644
--- a/mail/milter-regex/PLIST
+++ b/mail/milter-regex/PLIST
@@ -1,3 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2004/03/03 21:09:52 manu Exp $
+@comment $NetBSD: PLIST,v 1.3 2006/03/08 22:01:21 tron Exp $
sbin/milter-regex
man/man8/milter-regex.8
+share/examples/rc.d/milter-regex
diff --git a/mail/milter-regex/distinfo b/mail/milter-regex/distinfo
index 52271b1c0b6..cfa689a8905 100644
--- a/mail/milter-regex/distinfo
+++ b/mail/milter-regex/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.4 2005/02/24 09:59:24 agc Exp $
+$NetBSD: distinfo,v 1.5 2006/03/08 22:01:21 tron Exp $
-SHA1 (milter-regex-1.5.tar.gz) = 2dcd022d40ec4032c0b8611614e579daf66b2477
-RMD160 (milter-regex-1.5.tar.gz) = 6833e983d5592c8a87728fa0534d889b6f4d00a9
-Size (milter-regex-1.5.tar.gz) = 15784 bytes
+SHA1 (milter-regex-1.6.tar.gz) = 4035f9ed20b54bc9c8409b1e7ffffde86dfc61af
+RMD160 (milter-regex-1.6.tar.gz) = 1cb60a063ac3e7cada2c9800710c6a0cc4862174
+Size (milter-regex-1.6.tar.gz) = 16969 bytes
SHA1 (patch-aa) = 86f23d34f994e0039a46861470af0aaca3396248
diff --git a/mail/milter-regex/files/milter-regex.sh b/mail/milter-regex/files/milter-regex.sh
new file mode 100644
index 00000000000..41315637de7
--- /dev/null
+++ b/mail/milter-regex/files/milter-regex.sh
@@ -0,0 +1,44 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: milter-regex.sh,v 1.1 2006/03/08 22:01:21 tron Exp $
+#
+
+# PROVIDE: milter-regex
+# REQUIRE: DAEMON
+# BEFORE: mail
+
+name="milterregex"
+rcvar="milterregex"
+command="@PREFIX@/sbin/milter-regex"
+command_args="-u smmsp"
+
+if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
+ . /etc/rc.subr
+ . /etc/rc.conf
+
+ load_rc_config $name
+ run_rc_command "$1"
+
+else # old NetBSD, Solaris, Linux, etc...
+ pidfile=/var/run/${name}.pid
+
+ case $1 in
+ start)
+ nohup ${command} -D ${command_args} </dev/null >/dev/null 1>&2 &
+ echo $! >${pidfile}
+
+ ;;
+ stop)
+ if [ -f ${pidfile} ]
+ then
+ kill `cat ${pidfile}`
+ rm -f ${pidfile}
+ fi
+ ;;
+ *)
+ @ECHO@ "Usage: $0 {start|stop}" 1>&2
+ exit 64
+ ;;
+ esac
+
+fi