View | Details | Raw Unified | Return to bug 123226
Collapse All | Expand All

(-)Makefile (-10 / +6 lines)
Lines 6-37 Link Here
6
#
6
#
7
7
8
PORTNAME=	pfflowd
8
PORTNAME=	pfflowd
9
PORTVERSION=	0.6
9
PORTVERSION=	0.7
10
CATEGORIES=	net
10
CATEGORIES=	net
11
MASTER_SITES=	http://www.mindrot.org/files/pfflowd/
11
MASTER_SITES=	http://www.mindrot.org/files/pfflowd/
12
12
13
MAINTAINER=	thompsa@FreeBSD.org
13
MAINTAINER=	ports@FreeBSD.org
14
COMMENT=	Convert pfsync states to NetFlow datagrams
14
COMMENT=	Convert pfsync states to NetFlow datagrams
15
15
16
USE_RC_SUBR=	pfflowd.sh
17
16
MAN8=		pfflowd.8
18
MAN8=		pfflowd.8
17
19
18
PLIST_FILES=	sbin/pfflowd \
20
PLIST_FILES=	sbin/pfflowd
19
		etc/rc.d/pfflowd.sh.sample
20
21
21
.include <bsd.port.pre.mk>
22
.include <bsd.port.pre.mk>
22
23
23
.if ${OSVERSION} < 502106
24
.if ${OSVERSION} < 502106
24
IGNORE=		"Only for 5.3 and above"
25
IGNORE=		only for 5.3 and above
25
.endif
26
.endif
26
27
27
.if ${OSVERSION} < 502119
28
.if ${OSVERSION} < 502119
28
EXTRA_PATCHES+=	${FILESDIR}/pf34-Makefile
29
EXTRA_PATCHES+=	${FILESDIR}/pf34-Makefile
29
.endif
30
.endif
30
31
31
post-patch:
32
	${SED} -e 's|@@PREFIX@@|${PREFIX}|g' < ${FILESDIR}/pfflowd.sh.sample \
33
		> ${WRKSRC}/pfflowd.sh.sample
34
35
pre-build:
32
pre-build:
36
	${CAT} ${FILESDIR}/pidfile.h > ${WRKSRC}/pidfile.h
33
	${CAT} ${FILESDIR}/pidfile.h > ${WRKSRC}/pidfile.h
37
	${CAT} ${FILESDIR}/pidfile.c > ${WRKSRC}/pidfile.c
34
	${CAT} ${FILESDIR}/pidfile.c > ${WRKSRC}/pidfile.c
Lines 39-44 pre-build: Link Here
39
do-install:
36
do-install:
40
	${INSTALL_PROGRAM} ${WRKSRC}/pfflowd ${PREFIX}/sbin
37
	${INSTALL_PROGRAM} ${WRKSRC}/pfflowd ${PREFIX}/sbin
41
	${INSTALL_MAN} ${WRKSRC}/pfflowd.8 ${PREFIX}/man/man8
38
	${INSTALL_MAN} ${WRKSRC}/pfflowd.8 ${PREFIX}/man/man8
42
	${INSTALL_SCRIPT} ${WRKSRC}/pfflowd.sh.sample ${PREFIX}/etc/rc.d/pfflowd.sh.sample
43
39
44
.include <bsd.port.post.mk>
40
.include <bsd.port.post.mk>
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (pfflowd-0.6.tar.gz) = c2d7bfff10594ffd3f50a7c54f8d9304
1
MD5 (pfflowd-0.7.tar.gz) = 1789c6d5bf571ae59027b6a2e03b168a
2
SHA256 (pfflowd-0.6.tar.gz) = 8e6d34d5e1fe78b58e750cf5108a2ef8f3b49fd2e8f4d0c96eef74ef163c7b00
2
SHA256 (pfflowd-0.7.tar.gz) = 17e5bfe0906db4acaba593764ae1769e8e95f624c7d8d59f04b431393ceb5d56
3
SIZE (pfflowd-0.6.tar.gz) = 12925
3
SIZE (pfflowd-0.7.tar.gz) = 11317
(-)files/pfflowd.sh.in (+42 lines)
Added Link Here
1
#!/bin/sh
2
# $FreeBSD$
3
#
4
5
# PROVIDE: pfflowd
6
# REQUIRE: LOGIN
7
8
#
9
# Add the following lines to /etc/rc.conf to enable pfflowd:
10
#
11
# pfflowd_enable="YES"
12
# pfflowd_host="<host>:<port>"
13
#
14
# DO NOT CHANGE THESE DEFAULT VALUES HERE
15
#
16
17
. %%RC_SUBR%%
18
19
name=pfflowd
20
rcvar=`set_rcvar`
21
22
load_rc_config $name
23
24
# set defaults
25
26
pfflowd_enable=${pfflowd_enable:-"NO"}
27
pfflowd_host=${pfflowd_host:-"127.0.0.1:2055"}
28
29
command=%%PREFIX%%/sbin/pfflowd
30
command_args="-n ${pfflowd_host}"
31
extra_commands=reload
32
33
stop_postcmd=stop_postcmd
34
35
stop_postcmd()
36
{
37
  rm -f $pidfile
38
}
39
40
pidfile="/var/run/${name}.pid"
41
42
run_rc_command "$1"
(-)files/pfflowd.sh.sample (-20 lines)
Removed Link Here
1
#!/bin/sh
2
3
# Enter the host to send the netflow datagrams to, the format
4
# is IP:PORT (e.g 127.0.0.1:2055)
5
host="127.0.0.1:2055"
6
7
case "$1" in
8
	start)
9
		echo -n " pfflowd"
10
		@@PREFIX@@/sbin/pfflowd -n ${host}
11
		;;
12
13
	stop)
14
		if [ ! -f /var/run/pfflowd.pid ]; then
15
			echo "pfflowd not running"
16
			exit 64
17
		fi
18
		kill `cat /var/run/pfflowd.pid`
19
		;;
20
esac

Return to bug 123226