1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00

Update to 3.3.0

PR:		87195
Submitted by:	Yuriy N. Shkandybin <jur@netams.com> (maintainer)
Approved by:	novel (mentor)
This commit is contained in:
Emanuel Haupt 2005-10-12 12:05:55 +00:00
parent 7c0c4e551a
commit c8c0799bf1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=145101
5 changed files with 84 additions and 41 deletions

View File

@ -6,61 +6,101 @@
#
PORTNAME= netams
PORTVERSION= 3.2.3
PORTVERSION= 3.3.0
CATEGORIES= net-mgmt
MASTER_SITES= http://www.netams.com/files/
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
http://www.netams.com/files/
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= jura@netams.com
COMMENT= Network Traffic Accounting and Monitoring Software
NO_PACKAGE= Depends on kernel
USE_SUBMAKE= yes
MAN8= netams.8 flowprobe.8 netamsctl.8
USE_REINPLACE= yes
MANCOMPRESSED= no
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
PREFIX="${PREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}" \
REALCURDIR="${.CURDIR}" \
REALCURDIR="${.CURDIR}"
ADMINCGI= .htaccess index.cgi policy.cgi showusercard.cgi user.cgi \
access.cgi login.cgi quota.cgi showusercard.tmpl view.cgi \
account.cgi netams.cgi radius.cgi subplan.cgi config.cgi \
plan.cgi russian.res unit.cgi
CGI= .htaccess config.cgi netams_api.pl russian.res \
netams_example.cgi usertool.cgi admintool.cgi login.cgi \
netams_graph.cgi
IMAGES= logo.gif logo-small.gif admintool-logo.gif showtable-logo.gif
MAN8= netams.8 flowprobe.8 netamsctl.8
SYSDIR?= /sys
OPTIONS= DEBUG "Build with debug symbols" off \
BW "Build with bandwidth limitation functionality" off \
HASH "Build with HASH support" off
.include <bsd.port.pre.mk>
FLAGS += ${PTHREAD_CFLAGS}
LIB += ${PTHREAD_LIBS}
.if !exists(${SYSDIR})
IGNORE= Could not find the kernel sources in ${SYSDIR}. Please define SYSDIR
.endif
#MAKE_ENV+= DEFINE="${DEFINE}" FLAGS="${FLAGS}" LIB="${LIB}"
post-patch:
@${REINPLACE_CMD} -E 's/^(CC).*/\1=$$(CXX)/; s|^(INCLUDE=).*|\1 ${LOCALBASE}/include|; s|^(CFLAGS).*=|\1+=|; /^FLAGS/d' \
${WRKSRC}/addon/Makefile.common
.if defined(WITHOUT_DEBUG)
@${REINPLACE_CMD} -e 's|configure.sh|configure.sh -nodebug|' \
${WRKSRC}/Makefile
.endif
.if defined(WITH_BW)
@${REINPLACE_CMD} -e 's|#DEFINE += -DHAVE_BW|DEFINE += -DHAVE_BW|' \
${WRKSRC}/addon/Makefile.common
.endif
.if defined(WITH_HASH)
@${REINPLACE_CMD} -e 's|#DEFINE += -DUSE_HASH|DEFINE += -DUSE_HASH|' \
${WRKSRC}/addon/Makefile.common
.endif
do-install:
@ ${INSTALL_PROGRAM} ${WRKSRC}/src/netams ${PREFIX}/libexec/netams
@ ${INSTALL_PROGRAM} ${WRKSRC}/src/flowprobe ${PREFIX}/sbin/flowprobe
@ ${INSTALL_PROGRAM} ${WRKSRC}/src/ipfw2netflow ${PREFIX}/sbin/ipfw2netflow
@ ${INSTALL_PROGRAM} ${WRKSRC}/src/netamsctl ${PREFIX}/bin/netamsctl
@ ${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg ${PREFIX}/etc/netams.cfg.sample
@ ${INSTALL_SCRIPT} ${WRKSRC}/addon/netams-startup.sh ${PREFIX}/etc/rc.d/netams-startup.sh.sample
@ ${INSTALL_MAN} ${WRKSRC}/doc/netams.8 ${PREFIX}/man/man8
@ ${INSTALL_MAN} ${WRKSRC}/doc/flowprobe.8 ${PREFIX}/man/man8
@ ${INSTALL_MAN} ${WRKSRC}/doc/netamsctl.8 ${PREFIX}/man/man8
@ ${MKDIR} ${DATADIR}
@ ${INSTALL_DATA} ${WRKSRC}/addon/ru-networks.txt ${DATADIR}/ru-networks.txt.sample
@ ${INSTALL_DATA} ${WRKSRC}/addon/.netamsctl.rc ${DATADIR}
@ ${MKDIR} ${DATADIR}/cgi-bin
@ ${MKDIR} ${DATADIR}/cgi-bin/admin
@ ${MKDIR} ${DATADIR}/cgi-bin/images
.for image in logo.gif logo-small.gif admintool-logo.gif showtable-logo.gif
@ ${INSTALL_DATA} ${WRKSRC}/cgi-bin/images/${image} ${DATADIR}/cgi-bin/images/
${INSTALL_PROGRAM} ${WRKSRC}/src/netams ${PREFIX}/libexec/netams
${INSTALL_PROGRAM} ${WRKSRC}/src/flowprobe ${PREFIX}/sbin/flowprobe
${INSTALL_PROGRAM} ${WRKSRC}/src/ipfw2netflow \
${PREFIX}/sbin/ipfw2netflow
${INSTALL_PROGRAM} ${WRKSRC}/src/netamsctl ${PREFIX}/bin/netamsctl
${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg \
${PREFIX}/etc/netams.cfg.sample
.if !exists(${PREFIX}/etc/netams.cfg)
${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg \
${PREFIX}/etc/netams.cfg
.endif
${INSTALL_SCRIPT} ${WRKSRC}/addon/netams-startup.sh \
${PREFIX}/etc/rc.d/netams-startup.sh.sample
${MKDIR} ${DATADIR}/cgi-bin/admin ${DATADIR}/cgi-bin/images
${INSTALL_DATA} ${WRKSRC}/addon/ru-networks.txt \
${DATADIR}/ru-networks.txt.sample
${INSTALL_DATA} ${WRKSRC}/addon/.netamsctl.rc ${DATADIR}
.for f in ${IMAGES}
${INSTALL_DATA} ${WRKSRC}/cgi-bin/images/${f} ${DATADIR}/cgi-bin/images
.endfor
.for cgi in .htaccess config.cgi netams_api.pl russian.res weblogin.tem netams_example.cgi \
usertool.cgi admintool.cgi login.cgi netams_graph.cgi weblogin.cgi
@ ${INSTALL_DATA} ${WRKSRC}/cgi-bin/${cgi} ${DATADIR}/cgi-bin/
.for f in ${CGI}
${INSTALL_DATA} ${WRKSRC}/cgi-bin/${f} ${DATADIR}/cgi-bin
.endfor
.for cgi in .htaccess index.cgi policy.cgi showusercard.cgi user.cgi access.cgi login.cgi \
quota.cgi showusercard.tmpl view.cgi account.cgi netams.cgi radius.cgi subplan.cgi \
config.cgi plan.cgi russian.res unit.cgi
@ ${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${cgi} ${DATADIR}/cgi-bin/admin/
.for f in ${ADMINCGI}
${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${f} ${DATADIR}/cgi-bin/admin
.endfor
.for f in ${MAN8}
${INSTALL_MAN} ${WRKSRC}/doc/${f} ${PREFIX}/man/man8
.endfor
post-install:
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message|${SED} 's|%%DATADIR%%|${DATADIR}|g'
@${SED} 's|%%PREFIX%%|${PREFIX}|g; s|%%DATADIR%%|${DATADIR}|g' \
${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (netams-3.2.3.tar.gz) = a578686950e74699e92d33b8379499be
SIZE (netams-3.2.3.tar.gz) = 231373
MD5 (netams-3.3.0.tar.gz) = 3dc96ad9f6b32172808dadeecc14cbae
SIZE (netams-3.3.0.tar.gz) = 315253

View File

@ -1,10 +1,11 @@
NeTAMS stands for Network Traffic Accounting and Monitoring Software.
It is built for UNIX and works for networks with Cisco routers or PC Unix
routers (Linux/FreeBSD/Solaris). Several methods of traffic gathering are
supported (tee/divert/ip_queue/libpcap/netflow v5), database storage
(BerkleyDB/MySQL/PostgresSQL), aggregation, visualization, notification etc.
It is possible to block traffic based on quotas, authorization ID, empty
balance (billing); manage bandwidth, create a flexible accounting and
filtration policies.
supported (tee/divert/ip_queue/libpcap/ulog/netflow v5 and v9/netgraph),
database storage (BerkleyDB/MySQL/PostgresSQL/Oracle/Radius), aggregation,
visualization, notification etc. It is possible to block traffic based on
quotas, web authorization, account balance (billing); manage bandwidth,
MAC assignmant violations, RADIUS services, create a flexible accounting
and filtering policies.
WWW: http://www.netams.com/

View File

@ -17,6 +17,7 @@ By default, CGI scripts are NOT installed, as well as web server is NOT configur
You should do it yourself, and then copy entire %%DATADIR%%/cgi/ directory to appropriate place.
And PLEASE READ THE DOCUMENTATION FIRST!
http://www.netams.com
--------------------------------------------------------------------------

View File

@ -1,4 +1,7 @@
@comment $FreeBSD$
@unexec if cmp -s %D/etc/netams.cfg %D/etc/netams.cfg.sample; then rm -f %D/etc/netams.cfg; fi
etc/netams.cfg.sample
@exec [ -f %B/netams.cfg ] || cp %B/%f %B/netams.cfg
etc/rc.d/netams-startup.sh.sample
libexec/netams
sbin/flowprobe
@ -10,13 +13,11 @@ bin/netamsctl
%%DATADIR%%/cgi-bin/config.cgi
%%DATADIR%%/cgi-bin/netams_api.pl
%%DATADIR%%/cgi-bin/russian.res
%%DATADIR%%/cgi-bin/weblogin.tem
%%DATADIR%%/cgi-bin/netams_example.cgi
%%DATADIR%%/cgi-bin/usertool.cgi
%%DATADIR%%/cgi-bin/admintool.cgi
%%DATADIR%%/cgi-bin/login.cgi
%%DATADIR%%/cgi-bin/netams_graph.cgi
%%DATADIR%%/cgi-bin/weblogin.cgi
%%DATADIR%%/cgi-bin/admin/.htaccess
%%DATADIR%%/cgi-bin/admin/index.cgi
%%DATADIR%%/cgi-bin/admin/policy.cgi