diff options
author | bms <bms@FreeBSD.org> | 2003-12-12 09:07:39 +0800 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2003-12-12 09:07:39 +0800 |
commit | bd8b027717301062af6fa0c606f38f336ca29288 (patch) | |
tree | 1270124bafb6dcdafa397ca56922846528fc773b /net | |
parent | fff6d4a914a935818c6203b89f5733b5b84503e9 (diff) | |
download | freebsd-ports-gnome-bd8b027717301062af6fa0c606f38f336ca29288.tar.gz freebsd-ports-gnome-bd8b027717301062af6fa0c606f38f336ca29288.tar.zst freebsd-ports-gnome-bd8b027717301062af6fa0c606f38f336ca29288.zip |
Add an rcNG script to this port, allowing trafd to be invoked more easily
during the boot process.
Sponsored by: The Paper Street Soap Company
Diffstat (limited to 'net')
-rw-r--r-- | net/trafd/Makefile | 19 | ||||
-rw-r--r-- | net/trafd/pkg-plist | 1 |
2 files changed, 18 insertions, 2 deletions
diff --git a/net/trafd/Makefile b/net/trafd/Makefile index 6e2181b92ca2..69b43254f901 100644 --- a/net/trafd/Makefile +++ b/net/trafd/Makefile @@ -7,7 +7,7 @@ PORTNAME= trafd PORTVERSION= 3.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= ftp://ftp.riss-telecom.ru/pub/dev/trafd/ EXTRACT_SUFX= .tgz @@ -17,6 +17,17 @@ COMMENT= The BPF Traffic Collector CONFLICTS= bpft-4.* +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 500000 +RUN_DEPENDS= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr +RCSUBRBASE= ${LOCALBASE}/etc +.else +RCSUBRBASE= /etc +.endif + +USE_REINPLACE= yes + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/trafd/trafd ${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/trafd/trafstart ${PREFIX}/bin @@ -27,6 +38,10 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/trafstatd/trafstatd ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/traflog/traflog ${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/traflog/traflog.format ${PREFIX}/etc + ${CP} ${FILESDIR}/trafd.sh.sample ${WRKDIR} + ${REINPLACE_CMD} -e "s|%%RC_SUBR%%|${RCSUBRBASE}/rc.subr|g;" \ + ${WRKDIR}/trafd.sh.sample + ${INSTALL_SCRIPT} ${WRKDIR}/trafd.sh.sample ${PREFIX}/etc/rc.d @${MKDIR} ${PREFIX}/var/trafd @${MKDIR} ${PREFIX}/var/log .if !defined(NOPORTDOCS) @@ -34,4 +49,4 @@ do-install: @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR} .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net/trafd/pkg-plist b/net/trafd/pkg-plist index aa17c21fe938..b0d384d59596 100644 --- a/net/trafd/pkg-plist +++ b/net/trafd/pkg-plist @@ -7,6 +7,7 @@ bin/trafstat bin/trafstatd bin/trafstop etc/traflog.format +etc/rc.d/trafd.sh.sample %%PORTDOCS%%share/doc/trafd/README %%PORTDOCS%%@dirrm share/doc/trafd @exec mkdir %D/var 2>/dev/null || true |