aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2008-05-26 17:51:09 +0800
committerrafan <rafan@FreeBSD.org>2008-05-26 17:51:09 +0800
commitf99d1b91ce4165a0f3769ea31f2101962ff4080e (patch)
tree70ee0d6b92c7bcc20dba739855bd042cd1ec8651 /net
parenta7c5ce25705236b8a321e62ad1e231ca37f477e1 (diff)
downloadfreebsd-ports-gnome-f99d1b91ce4165a0f3769ea31f2101962ff4080e.tar.gz
freebsd-ports-gnome-f99d1b91ce4165a0f3769ea31f2101962ff4080e.tar.zst
freebsd-ports-gnome-f99d1b91ce4165a0f3769ea31f2101962ff4080e.zip
- Update to 0.7
- Drop maintainership - Update rc script to the rc.d world order - Mark broken on FreeBSD < 7.x until someone wants to fix it PR: ports/123226 Submitted by: thompsa (maintainer)
Diffstat (limited to 'net')
-rw-r--r--net/pfflowd/Makefile18
-rw-r--r--net/pfflowd/distinfo6
-rw-r--r--net/pfflowd/files/pfflowd.in42
-rw-r--r--net/pfflowd/files/pfflowd.sh.sample20
4 files changed, 54 insertions, 32 deletions
diff --git a/net/pfflowd/Makefile b/net/pfflowd/Makefile
index 565a07888987..05828a45cad8 100644
--- a/net/pfflowd/Makefile
+++ b/net/pfflowd/Makefile
@@ -6,31 +6,32 @@
#
PORTNAME= pfflowd
-PORTVERSION= 0.6
+PORTVERSION= 0.7
CATEGORIES= net
MASTER_SITES= http://www.mindrot.org/files/pfflowd/
-MAINTAINER= thompsa@FreeBSD.org
+MAINTAINER= ports@FreeBSD.org
COMMENT= Convert pfsync states to NetFlow datagrams
+USE_RC_SUBR= ${PORTNAME}
+
MAN8= pfflowd.8
-PLIST_FILES= sbin/pfflowd \
- etc/rc.d/pfflowd.sh.sample
+PLIST_FILES= sbin/pfflowd
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 502106
-IGNORE= "Only for 5.3 and above"
+IGNORE= only for 5.3 and above
.endif
.if ${OSVERSION} < 502119
EXTRA_PATCHES+= ${FILESDIR}/pf34-Makefile
.endif
-post-patch:
- ${SED} -e 's|@@PREFIX@@|${PREFIX}|g' < ${FILESDIR}/pfflowd.sh.sample \
- > ${WRKSRC}/pfflowd.sh.sample
+if ${OSVERSION} < 700000
+BROKEN= does not compile
+.endif
pre-build:
${CAT} ${FILESDIR}/pidfile.h > ${WRKSRC}/pidfile.h
@@ -39,6 +40,5 @@ pre-build:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/pfflowd ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/pfflowd.8 ${PREFIX}/man/man8
- ${INSTALL_SCRIPT} ${WRKSRC}/pfflowd.sh.sample ${PREFIX}/etc/rc.d/pfflowd.sh.sample
.include <bsd.port.post.mk>
diff --git a/net/pfflowd/distinfo b/net/pfflowd/distinfo
index dbe6daa31f59..79ba5f188bee 100644
--- a/net/pfflowd/distinfo
+++ b/net/pfflowd/distinfo
@@ -1,3 +1,3 @@
-MD5 (pfflowd-0.6.tar.gz) = c2d7bfff10594ffd3f50a7c54f8d9304
-SHA256 (pfflowd-0.6.tar.gz) = 8e6d34d5e1fe78b58e750cf5108a2ef8f3b49fd2e8f4d0c96eef74ef163c7b00
-SIZE (pfflowd-0.6.tar.gz) = 12925
+MD5 (pfflowd-0.7.tar.gz) = 1789c6d5bf571ae59027b6a2e03b168a
+SHA256 (pfflowd-0.7.tar.gz) = 17e5bfe0906db4acaba593764ae1769e8e95f624c7d8d59f04b431393ceb5d56
+SIZE (pfflowd-0.7.tar.gz) = 11317
diff --git a/net/pfflowd/files/pfflowd.in b/net/pfflowd/files/pfflowd.in
new file mode 100644
index 000000000000..6e9a45d9b34e
--- /dev/null
+++ b/net/pfflowd/files/pfflowd.in
@@ -0,0 +1,42 @@
+#!/bin/sh
+# $FreeBSD$
+#
+
+# PROVIDE: pfflowd
+# REQUIRE: LOGIN
+
+#
+# Add the following lines to /etc/rc.conf to enable pfflowd:
+#
+# pfflowd_enable="YES"
+# pfflowd_host="<host>:<port>"
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+
+. %%RC_SUBR%%
+
+name=pfflowd
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+# set defaults
+
+pfflowd_enable=${pfflowd_enable:-"NO"}
+pfflowd_host=${pfflowd_host:-"127.0.0.1:2055"}
+
+command=%%PREFIX%%/sbin/pfflowd
+command_args="-n ${pfflowd_host}"
+extra_commands=reload
+
+stop_postcmd=stop_postcmd
+
+stop_postcmd()
+{
+ rm -f $pidfile
+}
+
+pidfile="/var/run/${name}.pid"
+
+run_rc_command "$1"
diff --git a/net/pfflowd/files/pfflowd.sh.sample b/net/pfflowd/files/pfflowd.sh.sample
deleted file mode 100644
index 65ba59d5c5a4..000000000000
--- a/net/pfflowd/files/pfflowd.sh.sample
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# Enter the host to send the netflow datagrams to, the format
-# is IP:PORT (e.g 127.0.0.1:2055)
-host="127.0.0.1:2055"
-
-case "$1" in
- start)
- echo -n " pfflowd"
- @@PREFIX@@/sbin/pfflowd -n ${host}
- ;;
-
- stop)
- if [ ! -f /var/run/pfflowd.pid ]; then
- echo "pfflowd not running"
- exit 64
- fi
- kill `cat /var/run/pfflowd.pid`
- ;;
-esac