Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 May 2004 18:33:14 +0400
From:      "Dennis S. Davidoff" <null@1system.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/66275: New port: net/cnupm The BPF Traffic Collector (IPv4/IPv6)
Message-ID:  <20040509143314.GA51696@mail.1system.ru>
In-Reply-To: <200405050820.i458KFxK014814@freefall.freebsd.org>
References:  <20040505081018.E23E134C@cvs.1system.ru> <200405050820.i458KFxK014814@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	cnupm/Makefile
#	cnupm/distinfo
#	cnupm/files
#	cnupm/pkg-descr
#	cnupm/pkg-message
#	cnupm/pkg-plist
#
echo x - cnupm/Makefile
sed 's/^X//' >cnupm/Makefile << 'END-of-cnupm/Makefile'
X# New ports collection makefile for:	cnupm
X# Date created:		29 October 2003
X# Whom:			Dennis S.Davidoff <null@1system.ru>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	cnupm
XPORTVERSION=	3.5
XCATEGORIES=	net ipv6
XMASTER_SITES=	http://pdp-11.org.ru/~form/cnupm/files/
X
XMAINTAINER=	null@1system.ru
XCOMMENT=	The BPF Traffic Collector (IPv4/IPv6)
X
XMAN8=		cnupm.8 cnupmstat.8
XMANCOMPRESSED=	yes
X
XCNUPM_OWN?=	cnupm
XCNUPM_GRP?=	cnupm
XCNUPM_UID?=	666
XCNUPM_GID?=	666
X
XPW=		/usr/sbin/pw
X
XPLIST_SUB+=	CNUPM_OWN="${CNUPM_OWN}" CNUPM_GRP="${CNUPM_GRP}" \
X		CNUPM_UID="${CNUPM_UID}" CNUPM_GID="${CNUPM_GID}"
X
Xpost-install:
X	${PW} groupshow ${CNUPM_GRP} 2>/dev/null || ${PW} group add \
X		-n ${CNUPM_GRP} -g ${CNUPM_GID}
X	${PW} user show ${CNUPM_OWN} 2>/dev/null || ${PW} user add \
X		-n ${CNUPM_OWN} -c 'Cnupm traffic collector' \
X		-u ${CNUPM_UID} -g ${CNUPM_GID} -s /sbin/nologin
X	${INSTALL} -o ${CNUPM_OWN} -g ${CNUPM_GRP} -m 750 -d ${PREFIX}/var/cnupm
X	${PW} user mod -n ${CNUPM_OWN} -d ${PREFIX}/var/cnupm
X	${INSTALL} -m 755 ${FILESDIR}/cnupm.sh ${PREFIX}/etc/rc.d
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DOCSDIR}
X	@${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X.endif
X
X	@${ECHO_CMD} '************************************************************'
X	@${ECHO_CMD} ''
X	@${ECHO_CMD} 'Add the following lines to /etc/rc.conf to enable cnupm:'
X	@${ECHO_CMD} ''
X	@${ECHO_CMD} 'cnupm_enable="YES"'
X	@${ECHO_CMD} 'cnupm_ifaces="rl0"      # Change this with your interface(s)!'
X	@${ECHO_CMD} '#cnupm_flags=""         # Set this one to override default flags'
X	@${ECHO_CMD} ''
X	@${ECHO_CMD} 'See cnupm(8) for flags'
X	@${ECHO_CMD} ''
X	@${ECHO_CMD} '************************************************************'
X
X.include <bsd.port.mk>
END-of-cnupm/Makefile
echo x - cnupm/distinfo
sed 's/^X//' >cnupm/distinfo << 'END-of-cnupm/distinfo'
XMD5 (cnupm-3.5.tar.gz) = c9b1f2670e7bd7aaeda6fa26d0434f4f
XSIZE (cnupm-3.5.tar.gz) = 31984
END-of-cnupm/distinfo
echo c - cnupm/files
mkdir -p cnupm/files > /dev/null 2>&1
echo x - cnupm/pkg-descr
sed 's/^X//' >cnupm/pkg-descr << 'END-of-cnupm/pkg-descr'
XThe cnupm is an IP/IPv6 traffic collector daemon; it listens on a network
Xinterface for IP/IPv6 packets that match the boolean expression (see
Xtcpdump(8) for more information) and collects the following statistics:
X
X     o   address family (INET/INET6)
X     o   IP/IPv6 protocol number
X     o   source IP/IPv6 address
X     o   source TCP/UDP port
X     o   destination IP/IPv6 address
X     o   destination TCP/UDP port
X     o   total number of bytes trasferred
X
XWWW: http://pdp-11.org.ru/~form/cnupm
END-of-cnupm/pkg-descr
echo x - cnupm/pkg-message
sed 's/^X//' >cnupm/pkg-message << 'END-of-cnupm/pkg-message'
X************************************************************
X
XAdd the following lines to /etc/rc.conf to enable cnupm:
X
Xcnupm_enable="YES"
Xcnupm_ifaces="rl0"	# Change this with your interface!
X#cnupm_flags=""		# Set this one to override default flags
X
XSee cnupm(8) for flags
X
X************************************************************
END-of-cnupm/pkg-message
echo x - cnupm/pkg-plist
sed 's/^X//' >cnupm/pkg-plist << 'END-of-cnupm/pkg-plist'
Xetc/rc.d/cnupm.sh
Xsbin/cnupm
Xsbin/cnupmstat
X%%PORTDOCS%%share/doc/cnupm/README
X%%PORTDOCS%%@dirrm share/doc/cnupm
X@exec pw groupshow %%CNUPM_GRP%% 2>/dev/null || pw group add -n cnupm -g %%CNUPM_GID%%
X@exec pw user show %%CNUPM_OWN%% 2>/dev/null || pw user add -n %%CNUPM_OWN%% -c 'Cnupm traffic collector' -u %%CNUPM_UID%% -g %%CNUPM_GID%% -s /sbin/nologin
X@exec install -o cnupm -g cnupm -m 750 -d %D/var/cnupm
X@exec pw user mod -n cnupm -d %D/var/cnupm
X@unexec rmdir %D/var/cnupm 2>/dev/null || true
END-of-cnupm/pkg-plist
exit



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040509143314.GA51696>