aboutsummaryrefslogtreecommitdiffstats
path: root/net/hsflowd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net/hsflowd/Makefile')
-rw-r--r--net/hsflowd/Makefile36
1 files changed, 36 insertions, 0 deletions
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>