aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/netams
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2005-10-12 12:05:55 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2005-10-12 12:05:55 +0000
commitc8c0799bf1a73f2d71e0609bd6ea750f72be456d (patch)
tree758f1d166df5b98bc293c6e28eaf771d9e7844cc /net-mgmt/netams
parent7c0c4e551a68a38b1d4d211e95eb008e23d5c5a1 (diff)
downloadports-c8c0799bf1a73f2d71e0609bd6ea750f72be456d.tar.gz
ports-c8c0799bf1a73f2d71e0609bd6ea750f72be456d.zip
Notes
Diffstat (limited to 'net-mgmt/netams')
-rw-r--r--net-mgmt/netams/Makefile104
-rw-r--r--net-mgmt/netams/distinfo4
-rw-r--r--net-mgmt/netams/pkg-descr11
-rw-r--r--net-mgmt/netams/pkg-message1
-rw-r--r--net-mgmt/netams/pkg-plist5
5 files changed, 84 insertions, 41 deletions
diff --git a/net-mgmt/netams/Makefile b/net-mgmt/netams/Makefile
index e710433f2585..462869026787 100644
--- a/net-mgmt/netams/Makefile
+++ b/net-mgmt/netams/Makefile
@@ -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
+
+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
-#MAKE_ENV+= DEFINE="${DEFINE}" FLAGS="${FLAGS}" LIB="${LIB}"
+.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 f in ${CGI}
+ ${INSTALL_DATA} ${WRKSRC}/cgi-bin/${f} ${DATADIR}/cgi-bin
.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 ${ADMINCGI}
+ ${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${f} ${DATADIR}/cgi-bin/admin
.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 ${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>
diff --git a/net-mgmt/netams/distinfo b/net-mgmt/netams/distinfo
index 692315a68561..5fdab2f7fc8e 100644
--- a/net-mgmt/netams/distinfo
+++ b/net-mgmt/netams/distinfo
@@ -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
diff --git a/net-mgmt/netams/pkg-descr b/net-mgmt/netams/pkg-descr
index 8b2238d66d2f..7c53e29a2ebc 100644
--- a/net-mgmt/netams/pkg-descr
+++ b/net-mgmt/netams/pkg-descr
@@ -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/
diff --git a/net-mgmt/netams/pkg-message b/net-mgmt/netams/pkg-message
index 84c7fd02453f..5bd6e7999833 100644
--- a/net-mgmt/netams/pkg-message
+++ b/net-mgmt/netams/pkg-message
@@ -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
--------------------------------------------------------------------------
diff --git a/net-mgmt/netams/pkg-plist b/net-mgmt/netams/pkg-plist
index cfacf16c535c..e297295413c9 100644
--- a/net-mgmt/netams/pkg-plist
+++ b/net-mgmt/netams/pkg-plist
@@ -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