mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
- add startup script using rc.subr(8)
- make portlint happier PR: 91596 Submitted by: Hirohisa Yamaguchi - drop pkg-plist - new option WITHOUT_RC_NG
This commit is contained in:
parent
bf98501181
commit
8eb500556c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=153706
@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
PORTNAME= sid-milter
|
PORTNAME= sid-milter
|
||||||
PORTVERSION= 0.2.10
|
PORTVERSION= 0.2.10
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= mail
|
CATEGORIES= mail
|
||||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||||
MASTER_SITE_SUBDIR= sid-milter
|
MASTER_SITE_SUBDIR= sid-milter
|
||||||
@ -22,7 +23,7 @@ BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/${SENDMAIL_MILTER_
|
|||||||
.endif
|
.endif
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
RESTRICTED= may incorporate intellectual property, possible patent issues
|
RESTRICTED= "may incorporate intellectual property, possible patent issues"
|
||||||
|
|
||||||
SENDMAIL_MILTER_PORT?= sendmail
|
SENDMAIL_MILTER_PORT?= sendmail
|
||||||
USE_REINPLACE= yes
|
USE_REINPLACE= yes
|
||||||
@ -30,6 +31,8 @@ WCONF= ${WRKSRC}/devtools/Site
|
|||||||
MAN8= sid-filter.8
|
MAN8= sid-filter.8
|
||||||
DOCSFILES= INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES
|
DOCSFILES= INSTALL KNOWNBUGS LICENSE README README-SenderID RELEASE_NOTES
|
||||||
INSTALL_WRKSRC= ${WRKSRC}/sid-filter
|
INSTALL_WRKSRC= ${WRKSRC}/sid-filter
|
||||||
|
PLIST_FILES= libexec/sid-filter
|
||||||
|
PORTDOCS= ${DOCSFILES}
|
||||||
|
|
||||||
SITE+= ${FILESDIR}/site.config.m4
|
SITE+= ${FILESDIR}/site.config.m4
|
||||||
.if !defined(SENDMAIL_MILTER_IN_BASE)
|
.if !defined(SENDMAIL_MILTER_IN_BASE)
|
||||||
@ -37,9 +40,12 @@ SITE+= ${FILESDIR}/site.config.m4.milter
|
|||||||
.endif
|
.endif
|
||||||
.if defined(WITH_SIDMILTER_AR)
|
.if defined(WITH_SIDMILTER_AR)
|
||||||
MAN3= ar.3
|
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
|
.else
|
||||||
PLIST_SUB+= WITH_AR="@comment "
|
USE_RC_SUBR= milter-sid.sh
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.include <bsd.port.pre.mk>
|
.include <bsd.port.pre.mk>
|
||||||
@ -53,8 +59,10 @@ pre-fetch:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
pre-configure:
|
pre-configure:
|
||||||
|
.if defined(WITHOUT_RC_NG)
|
||||||
@${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/milter-sid.sh \
|
@${SED} -e "s=%%PREFIX%%=${PREFIX}=" ${FILESDIR}/milter-sid.sh \
|
||||||
> ${WRKSRC}/milter-sid.sh
|
> ${WRKSRC}/milter-sid.sh
|
||||||
|
.endif
|
||||||
${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' \
|
${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' \
|
||||||
-e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|' \
|
-e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|' \
|
||||||
-e "s|\`-O'|\`${CFLAGS}'|g" \
|
-e "s|\`-O'|\`${CFLAGS}'|g" \
|
||||||
@ -65,8 +73,10 @@ pre-configure:
|
|||||||
${SITE} > ${WCONF}/site.config.m4
|
${SITE} > ${WCONF}/site.config.m4
|
||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
|
.if defined(WITHOUT_RC_NG)
|
||||||
${INSTALL_SCRIPT} ${WRKSRC}/milter-sid.sh \
|
${INSTALL_SCRIPT} ${WRKSRC}/milter-sid.sh \
|
||||||
${PREFIX}/etc/rc.d/milter-sid.sh.sample
|
${PREFIX}/etc/rc.d/milter-sid.sh.sample
|
||||||
|
.endif
|
||||||
.for i in ${MAN8}
|
.for i in ${MAN8}
|
||||||
@${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz
|
@${RM} -f ${MANPREFIX}/man/cat8/${i} ${MANPREFIX}/man/cat8/${i}.gz
|
||||||
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8/
|
${INSTALL_MAN} ${WRKSRC}/*/${i} ${MANPREFIX}/man/man8/
|
||||||
|
43
mail/sid-milter/files/milter-sid.sh.in
Normal file
43
mail/sid-milter/files/milter-sid.sh.in
Normal file
@ -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"
|
@ -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%%
|
|
Loading…
Reference in New Issue
Block a user