diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2006-01-17 07:27:38 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2006-01-17 07:27:38 +0000 |
commit | 8eb500556c0bec4d95aeccee87e9b0ae6d94e5c6 (patch) | |
tree | cfcf62410d2ca793c6bca026ac1aacc71e05dbe9 /mail/sid-milter | |
parent | bf985011817013bda3c66b2b09dc56b276819164 (diff) | |
download | ports-8eb500556c0bec4d95aeccee87e9b0ae6d94e5c6.tar.gz ports-8eb500556c0bec4d95aeccee87e9b0ae6d94e5c6.zip |
Notes
Diffstat (limited to 'mail/sid-milter')
-rw-r--r-- | mail/sid-milter/Makefile | 16 | ||||
-rw-r--r-- | mail/sid-milter/files/milter-sid.sh.in | 43 | ||||
-rw-r--r-- | mail/sid-milter/pkg-plist | 11 |
3 files changed, 56 insertions, 14 deletions
diff --git a/mail/sid-milter/Makefile b/mail/sid-milter/Makefile index db8673c94f0f..4b8043927041 100644 --- a/mail/sid-milter/Makefile +++ b/mail/sid-milter/Makefile @@ -7,6 +7,7 @@ PORTNAME= sid-milter PORTVERSION= 0.2.10 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= sid-milter @@ -22,7 +23,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/${SENDMAIL_MILTER_ .endif .endif -RESTRICTED= may incorporate intellectual property, possible patent issues +RESTRICTED= "may incorporate intellectual property, possible patent issues" SENDMAIL_MILTER_PORT?= sendmail USE_REINPLACE= yes @@ -30,6 +31,8 @@ WCONF= ${WRKSRC}/devtools/Site MAN8= sid-filter.8 DOCSFILES= INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES INSTALL_WRKSRC= ${WRKSRC}/sid-filter +PLIST_FILES= libexec/sid-filter +PORTDOCS= ${DOCSFILES} SITE+= ${FILESDIR}/site.config.m4 .if !defined(SENDMAIL_MILTER_IN_BASE) @@ -37,9 +40,12 @@ SITE+= ${FILESDIR}/site.config.m4.milter .endif .if defined(WITH_SIDMILTER_AR) MAN3= ar.3 -PLIST_SUB+= WITH_AR="" +PLIST_FILES+= include/libar.h lib/libar.a +.endif +.if defined(WITHOUT_RC_NG) +PLIST_FILES+= etc/rc.d/milter-sid.sh.sample .else -PLIST_SUB+= WITH_AR="@comment " +USE_RC_SUBR= milter-sid.sh .endif .include <bsd.port.pre.mk> @@ -53,8 +59,10 @@ pre-fetch: .endif pre-configure: +.if defined(WITHOUT_RC_NG) @${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/milter-sid.sh \ > ${WRKSRC}/milter-sid.sh +.endif ${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' \ -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|' \ -e "s|\`-O'|\`${CFLAGS}'|g" \ @@ -65,8 +73,10 @@ pre-configure: ${SITE} > ${WCONF}/site.config.m4 post-install: +.if defined(WITHOUT_RC_NG) ${INSTALL_SCRIPT} ${WRKSRC}/milter-sid.sh \ ${PREFIX}/etc/rc.d/milter-sid.sh.sample +.endif .for i in ${MAN8} @${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz ${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8/ diff --git a/mail/sid-milter/files/milter-sid.sh.in b/mail/sid-milter/files/milter-sid.sh.in new file mode 100644 index 000000000000..34094b71f63f --- /dev/null +++ b/mail/sid-milter/files/milter-sid.sh.in @@ -0,0 +1,43 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: miltersid +# REQUIRE: DAEMON +# BEFORE: mail localpkg +# KEYWORD: shutdown + +# Define these miltersid_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/miltersid +# +# DO NOT CHdANGE THESE DEFAULT VALUES HERE +# +miltersid_enable=${miltersid_enable:-"NO"} +miltersid_socket=${miltersid_socket:-"local:/var/run/sid-filter"} +miltersid_pid=${miltersid_pid:-"/var/run/sid-filter.pid"} +miltersid_flags=${miltersid_flags:-"-r 0 -t"} + +. %%RC_SUBR%% + +name="miltersid" +pidfile=${miltersid_pid} +rcvar=`set_rcvar` +command="%%PREFIX%%/libexec/sid-filter" +command_args="-l -p ${miltersid_socket} -P ${miltersid_pid}" +stop_postcmd="sid_postcmd" + +load_rc_config $name + +sid_postcmd () +{ + if [ -S ${miltersid_socket##local:} ] ; then + rm -f ${miltersid_socket##local:} + elif [ -S ${miltersid_socket##unix:} ] ; then + rm -f ${miltersid_socket##unix:} + fi +} + +run_rc_command "$1" diff --git a/mail/sid-milter/pkg-plist b/mail/sid-milter/pkg-plist deleted file mode 100644 index 6f6455dc21f3..000000000000 --- a/mail/sid-milter/pkg-plist +++ /dev/null @@ -1,11 +0,0 @@ -etc/rc.d/milter-sid.sh.sample -libexec/sid-filter -%%WITH_AR%%include/libar.h -%%WITH_AR%%lib/libar.a -%%PORTDOCS%%%%DOCSDIR%%/INSTALL -%%PORTDOCS%%%%DOCSDIR%%/KNOWNBUGS -%%PORTDOCS%%%%DOCSDIR%%/LICENSE -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/README-SenderID -%%PORTDOCS%%%%DOCSDIR%%/RELEASE_NOTES -%%PORTDOCS%%@dirrm %%DOCSDIR%% |