From 56e5247fbfdbf5610b6629d93bef435a8f0c44ca Mon Sep 17 00:00:00 2001 From: Ying-Chieh Liao Date: Sat, 21 Sep 2002 02:26:08 +0000 Subject: [PATCH] add sentinel 1.2b Sentinel is a sendmail milter API implementation PR: 38085 Submitted by: Peter Hollaubek --- mail/Makefile | 1 + mail/sentinel/Makefile | 38 ++++++++++++++++++++ mail/sentinel/distinfo | 1 + mail/sentinel/files/000.sentinel.sh | 35 ++++++++++++++++++ mail/sentinel/files/patch-Makefile.FreeBSD | 19 ++++++++++ mail/sentinel/files/patch-sentinel.cf.SAMPLE | 10 ++++++ mail/sentinel/pkg-comment | 1 + mail/sentinel/pkg-descr | 5 +++ mail/sentinel/pkg-plist | 8 +++++ 9 files changed, 118 insertions(+) create mode 100644 mail/sentinel/Makefile create mode 100644 mail/sentinel/distinfo create mode 100644 mail/sentinel/files/000.sentinel.sh create mode 100644 mail/sentinel/files/patch-Makefile.FreeBSD create mode 100644 mail/sentinel/files/patch-sentinel.cf.SAMPLE create mode 100644 mail/sentinel/pkg-comment create mode 100644 mail/sentinel/pkg-descr create mode 100644 mail/sentinel/pkg-plist diff --git a/mail/Makefile b/mail/Makefile index 08322da4f6bf..ec01ec1a9ecc 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -225,6 +225,7 @@ SUBDIR += sendmail-ldap SUBDIR += sendmail-old SUBDIR += sendmail-sasl + SUBDIR += sentinel SUBDIR += serialmail SUBDIR += sigit SUBDIR += sigrot diff --git a/mail/sentinel/Makefile b/mail/sentinel/Makefile new file mode 100644 index 000000000000..00084413049c --- /dev/null +++ b/mail/sentinel/Makefile @@ -0,0 +1,38 @@ +# New ports collection makefile for: sentinel +# Date created: 14 May 2002 +# Whom: Peter Hollaubek +# +# $FreeBSD$ +# + +PORTNAME= sentinel +PORTVERSION= 1.2b +CATEGORIES= mail +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= smfilter +DISTNAME= ${PORTNAME}-${PORTVERSION} + +MAINTAINER= ports@FreeBSD.org + +USE_REINPLACE= yes +MAKEFILE= Makefile.FreeBSD +ALL_TARGET= sentinel + +post-patch: + @${REINPLACE_CMD} -e "s,-pthread,${PTHREAD_LIBS},g" ${WRKSRC}/${MAKEFILE} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/sentinel ${PREFIX}/sbin + @${MKDIR} ${PREFIX}/var/sentinel + ${CHOWN} smmsp.smmsp ${PREFIX}/var/sentinel + ${INSTALL_SCRIPT} ${FILESDIR}/000.sentinel.sh ${PREFIX}/etc/rc.d + ${INSTALL_DATA} ${WRKSRC}/sentinel.cf.SAMPLE ${PREFIX}/etc/sentinel.cf.dist + +post-install: + @${STRIP_CMD} ${PREFIX}/sbin/sentinel +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} +.endif + +.include diff --git a/mail/sentinel/distinfo b/mail/sentinel/distinfo new file mode 100644 index 000000000000..78eaa8f8b7fe --- /dev/null +++ b/mail/sentinel/distinfo @@ -0,0 +1 @@ +MD5 (sentinel-1.2b.tar.gz) = ff166f7903569b5c5729e034e0ae8825 diff --git a/mail/sentinel/files/000.sentinel.sh b/mail/sentinel/files/000.sentinel.sh new file mode 100644 index 000000000000..db8fcf043587 --- /dev/null +++ b/mail/sentinel/files/000.sentinel.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then + echo "$0: Cannot determine the PREFIX" >&2 + exit 1 +fi + +SMFILTER=${PREFIX}/sbin/sentinel +CONFIG=${PREFIX}/etc/sentinel.cf +SOCKET=${PREFIX}/var/sentinel/sentinel.socket + +case "$1" in +start) + if [ -x ${PREFIX}/sbin/sentinel -a -f ${PREFIX}/etc/sentinel.cf ] + then + if [ -f ${SOCKET} ] + then + killall sentinel + rm -f $SOCKET + fi + ${PREFIX}/sbin/sentinel -c ${PREFIX}/etc/sentinel.cf -p unix:${SOCKET} -d && echo -n ' sentinel' + fi + ;; +stop) + if [ -f ${SOCKET} ] + then + killall sentinel + fi + ;; +*) + echo "Usage: `basename $0` {start|stop}" >&2 + ;; +esac + +exit 0 diff --git a/mail/sentinel/files/patch-Makefile.FreeBSD b/mail/sentinel/files/patch-Makefile.FreeBSD new file mode 100644 index 000000000000..29e6622cb8db --- /dev/null +++ b/mail/sentinel/files/patch-Makefile.FreeBSD @@ -0,0 +1,19 @@ +--- Makefile.FreeBSD.orig Tue May 14 16:05:07 2002 ++++ Makefile.FreeBSD Tue May 14 16:05:38 2002 +@@ -2,12 +2,12 @@ + + CFLAGS = -O -I../../include + +-LDFLAGS = -L../libmilter -L../libsmutil -L../libsm -pthread ++LDFLAGS = -L../libmilter -pthread + +-LIBS = -lmilter -lsmutil -lsm ++LIBS = -lmilter + + OBJS = sentinel.o + +-sentinel: $(OBJS) +- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) ++sentinel: $(OBJS) ++ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + diff --git a/mail/sentinel/files/patch-sentinel.cf.SAMPLE b/mail/sentinel/files/patch-sentinel.cf.SAMPLE new file mode 100644 index 000000000000..cb97f1f89d90 --- /dev/null +++ b/mail/sentinel/files/patch-sentinel.cf.SAMPLE @@ -0,0 +1,10 @@ +--- sentinel.cf.SAMPLE.orig Tue May 14 17:18:45 2002 ++++ sentinel.cf.SAMPLE Tue May 14 17:19:20 2002 +@@ -1,6 +1,6 @@ + [global] + tmp:/var/tmp +-log:/var/log/smfilter.log ++log:/usr/local/var/sentinel/smfilter.log + user:smmsp + group:smmsp + diff --git a/mail/sentinel/pkg-comment b/mail/sentinel/pkg-comment new file mode 100644 index 000000000000..7ad8836f4b2b --- /dev/null +++ b/mail/sentinel/pkg-comment @@ -0,0 +1 @@ +Sentinel is a sendmail milter API implementation diff --git a/mail/sentinel/pkg-descr b/mail/sentinel/pkg-descr new file mode 100644 index 000000000000..f1cc7a30334f --- /dev/null +++ b/mail/sentinel/pkg-descr @@ -0,0 +1,5 @@ +Sentinel is a sendmail milter API implementation. This package might +be usefull for unix system administrators who is using freeware +Sendmail. May be it's one more milter, but on the other side it's +flexible enough to satisfy more or less subtle requirements for mail +filtering. diff --git a/mail/sentinel/pkg-plist b/mail/sentinel/pkg-plist new file mode 100644 index 000000000000..82d1916670c0 --- /dev/null +++ b/mail/sentinel/pkg-plist @@ -0,0 +1,8 @@ +sbin/sentinel +etc/sentinel.cf.dist +etc/rc.d/000.sentinel.sh +@exec mkdir %D/var/sentinel +@exec chown smmsp.smmsp %D/var/sentinel +@dirrm var/sentinel +%%PORTDOCS%%share/doc/sentinel/README +%%PORTDOCS%%@dirrm share/doc/sentinel