diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2012-12-07 19:24:29 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2012-12-07 19:24:29 +0000 |
commit | ba90b3874b46a6350ad9b9336d2c6c1e990314f1 (patch) | |
tree | 5649a1c380aaee33f053ed0026c25bb8be5cc5bf | |
parent | 01b1da6177366d239cdd6e91b1c0e11baee58b62 (diff) | |
download | ports-ba90b3874b46a6350ad9b9336d2c6c1e990314f1.tar.gz ports-ba90b3874b46a6350ad9b9336d2c6c1e990314f1.zip |
Notes
-rw-r--r-- | net/Makefile | 1 | ||||
-rw-r--r-- | net/hsflowd/Makefile | 36 | ||||
-rw-r--r-- | net/hsflowd/distinfo | 2 | ||||
-rw-r--r-- | net/hsflowd/files/hsflowd.in | 29 | ||||
-rw-r--r-- | net/hsflowd/files/pkg-message.in | 4 | ||||
-rw-r--r-- | net/hsflowd/pkg-descr | 6 | ||||
-rw-r--r-- | net/hsflowd/pkg-plist | 6 |
7 files changed, 84 insertions, 0 deletions
diff --git a/net/Makefile b/net/Makefile index cb871dc24f13..d72dfaeff4ab 100644 --- a/net/Makefile +++ b/net/Makefile @@ -229,6 +229,7 @@ SUBDIR += hs-sendfile SUBDIR += hs-simple-sendfile SUBDIR += hs-socks + SUBDIR += hsflowd SUBDIR += htpdate SUBDIR += http_ping SUBDIR += httping diff --git a/net/hsflowd/Makefile b/net/hsflowd/Makefile new file mode 100644 index 000000000000..f38ab075bbba --- /dev/null +++ b/net/hsflowd/Makefile @@ -0,0 +1,36 @@ +# Created by: Ryan Steinmetz <zi@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= hsflowd +PORTVERSION= 1.22.2 +CATEGORIES= net +MASTER_SITES= SF/host-sflow/REL-1_22/ \ + http://mirrors.rit.edu/zi/ + +MAINTAINER= zi@FreeBSD.org +COMMENT= Agent that exports metrics using the sFlow protocol + +MAKE_JOBS_UNSAFE= no +SUB_FILES= pkg-message +USE_RC_SUBR= ${PORTNAME} +MAKE_ENV= BINDIR=${PREFIX}/sbin INITDIR=${PREFIX}/etc/rc.d \ + CONFDIR=${ETCDIR} + +post-patch: + @${REINPLACE_CMD} -e 's|gcc|${CC}|g' \ + -e '/scripts\/hsflowd /d' \ + -e 's|hsflowd.conf|hsflowd.conf.sample|g' \ + ${WRKSRC}/src/FreeBSD/Makefile ${WRKSRC}/src/sflow/Makefile \ + ${WRKSRC}/src/json/Makefile + @${REINPLACE_CMD} -e 's|/etc|${ETCDIR}|g' ${WRKSRC}/src/FreeBSD/hsflowd.h + @${REINPLACE_CMD} -e 's|/usr|${PREFIX}|g' \ + ${WRKSRC}/src/FreeBSD/scripts/hsflowd + @${MV} ${WRKSRC}/src/FreeBSD/scripts/hsflowd.conf \ + ${WRKSRC}/src/FreeBSD/scripts/hsflowd.conf.sample + +post-install: + @if [ ! -f ${ETCDIR}/hsflowd.conf ]; then \ + ${CP} ${ETCDIR}/hsflowd.conf.sample ${ETCDIR}/hsflowd.conf ; \ + fi + +.include <bsd.port.mk> diff --git a/net/hsflowd/distinfo b/net/hsflowd/distinfo new file mode 100644 index 000000000000..c0f3217c5801 --- /dev/null +++ b/net/hsflowd/distinfo @@ -0,0 +1,2 @@ +SHA256 (hsflowd-1.22.2.tar.gz) = 648806afa02cb5588dd69aba54be0d5810f56af112003a861df0aadd6c28611c +SIZE (hsflowd-1.22.2.tar.gz) = 1841547 diff --git a/net/hsflowd/files/hsflowd.in b/net/hsflowd/files/hsflowd.in new file mode 100644 index 000000000000..86fcf7a1b787 --- /dev/null +++ b/net/hsflowd/files/hsflowd.in @@ -0,0 +1,29 @@ +#!/bin/sh +# +# init(1) startup script for hsflowd daemon +# +# description: Host sFlow Daemon +# processname: hsflowd +# pidfile: /var/run/hsflowd.pid +# + +. /etc/rc.subr + + +name=hsflowd +rcvar=`set_rcvar` + +load_rc_config $name + +hsflowd_enable=${hsflowd_enable:-"NO"} + +stop_postcmd="hsflowd_postcmd" + +command="%%PREFIX%%/sbin/${name}" +pidfile="/var/run/${name}.pid" + +hsflowd_postcmd() { + rm -f $pidfile +} + +run_rc_command "$1" diff --git a/net/hsflowd/files/pkg-message.in b/net/hsflowd/files/pkg-message.in new file mode 100644 index 000000000000..b5d3a0d94afa --- /dev/null +++ b/net/hsflowd/files/pkg-message.in @@ -0,0 +1,4 @@ +Please edit %%ETCDIR%%/hsflowd.conf based on your needs and add the following +to /etc/rc.conf: + +hsflowd_enable="YES" diff --git a/net/hsflowd/pkg-descr b/net/hsflowd/pkg-descr new file mode 100644 index 000000000000..01bb0e6a73aa --- /dev/null +++ b/net/hsflowd/pkg-descr @@ -0,0 +1,6 @@ +The Host sFlow agent exports physical and virtual server performance +metrics using the sFlow protocol. The agent provides scalable, +multi-vendor, multi-OS performance monitoring with minimal impact on +the systems being monitored. + +WWW: http://host-sflow.sourceforge.net/ diff --git a/net/hsflowd/pkg-plist b/net/hsflowd/pkg-plist new file mode 100644 index 000000000000..beefeb2203c3 --- /dev/null +++ b/net/hsflowd/pkg-plist @@ -0,0 +1,6 @@ +@comment $FreeBSD$ +etc/hsflowd/hsflowd.conf.sample +sbin/hsflowd +@dirrmtry etc/hsflowd +@unexec if cmp -s %D/etc/hsflowd/hsflowd.conf %D/etc/hsflowd.conf.sample; then rm -f %D/etc/hsflowd.conf; fi +@unexec if [ -d %%ETCDIR%% ]; then echo "==> If you are permanently removing this port, you should do a ``rm -rf %%ETCDIR%%`` to remove any configuration files."; fi |