diff options
author | rafan <rafan@FreeBSD.org> | 2007-07-08 20:41:41 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2007-07-08 20:41:41 +0800 |
commit | b78b5d99b1782ae29e1728176fe887e867d9fc5e (patch) | |
tree | 1d1ceee3ec59ac9d9563114a39821faa939a5433 /net-mgmt/netams | |
parent | 7185a4d5d3580e164d6cf0a63c97cbee468591c7 (diff) | |
download | freebsd-ports-gnome-b78b5d99b1782ae29e1728176fe887e867d9fc5e.tar.gz freebsd-ports-gnome-b78b5d99b1782ae29e1728176fe887e867d9fc5e.tar.zst freebsd-ports-gnome-b78b5d99b1782ae29e1728176fe887e867d9fc5e.zip |
- Update to 3.4.0 RC 2
- Use DISTVERSION to simplify things
- Correct NO_PACKAGE message
- Remove unused SYSDIR variable and dead code
- Remove BROKEN on 6.x and above, it builds now
- Use MAN8PREFIX for man8 pages
- Refine pkg-message, and use SUB_FILES for it
- Respect PREFIX in rc script, and refine the script a bit
PR: ports/113209
Submitted by: Dima Panov <fluffy at ael.ru>
Approved by: Yuriy N. Shkandybin <jura at netams.com> (maintainer)
Diffstat (limited to 'net-mgmt/netams')
-rw-r--r-- | net-mgmt/netams/Makefile | 30 | ||||
-rw-r--r-- | net-mgmt/netams/distinfo | 6 | ||||
-rw-r--r-- | net-mgmt/netams/files/netams.in | 11 | ||||
-rw-r--r-- | net-mgmt/netams/files/patch-src__common.c | 29 | ||||
-rw-r--r-- | net-mgmt/netams/files/patch-src__ng_netams.c | 25 | ||||
-rw-r--r-- | net-mgmt/netams/files/pkg-message.in (renamed from net-mgmt/netams/pkg-message) | 0 | ||||
-rw-r--r-- | net-mgmt/netams/pkg-descr | 11 | ||||
-rw-r--r-- | net-mgmt/netams/pkg-plist | 1 |
8 files changed, 26 insertions, 87 deletions
diff --git a/net-mgmt/netams/Makefile b/net-mgmt/netams/Makefile index 54c012093815..8f206cbe6088 100644 --- a/net-mgmt/netams/Makefile +++ b/net-mgmt/netams/Makefile @@ -6,23 +6,23 @@ # PORTNAME= netams -PORTVERSION= 3.3.5 -PORTREVISION= 1 +DISTVERSION= 3.4.0rc2 CATEGORIES= net-mgmt 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 +NO_PACKAGE= Depends on installed SQL database USE_SUBMAKE= yes USE_RC_SUBR= netams MANCOMPRESSED= no +SUB_FILES= pkg-message + SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \ PREFIX="${PREFIX}" \ TOUCH="${TOUCH}" \ @@ -39,25 +39,13 @@ CGI= .htaccess config.cgi netams_api.pl russian.res \ IMAGES= logo.gif logo_sm.jpg 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> -.if ${OSVERSION} >= 601104 -BROKEN= Does not compile on FreeBSD >= 6.x -.endif - -#.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 @@ -65,18 +53,19 @@ post-patch: .if defined(WITH_BW) @${REINPLACE_CMD} -e 's|#DEFINE += -DHAVE_BW|DEFINE += -DHAVE_BW|' \ - ${WRKSRC}/addon/Makefile.common + ${WRKSRC}/configure.sh .endif .if defined(WITH_HASH) @${REINPLACE_CMD} -e 's|#DEFINE += -DUSE_HASH|DEFINE += -DUSE_HASH|' \ - ${WRKSRC}/addon/Makefile.common + ${WRKSRC}/configure.sh .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/ascii2netflow ${PREFIX}/sbin/ascii2netflow ${INSTALL_PROGRAM} ${WRKSRC}/src/netamsctl ${PREFIX}/bin/netamsctl ${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg ${PREFIX}/etc/netams.cfg.sample ${MKDIR} ${DATADIR}/cgi-bin/admin ${DATADIR}/cgi-bin/images @@ -92,11 +81,10 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/cgi-bin/admin/${f} ${DATADIR}/cgi-bin/admin .endfor .for f in ${MAN8} - ${INSTALL_MAN} ${WRKSRC}/doc/${f} ${PREFIX}/man/man8 + ${INSTALL_MAN} ${WRKSRC}/doc/${f} ${MAN8PREFIX}/man/man8 .endfor post-install: - @${SED} 's|%%PREFIX%%|${PREFIX}|g; s|%%DATADIR%%|${DATADIR}|g' \ - ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/net-mgmt/netams/distinfo b/net-mgmt/netams/distinfo index 8801585ce8c3..b7c5c5dcc1ef 100644 --- a/net-mgmt/netams/distinfo +++ b/net-mgmt/netams/distinfo @@ -1,3 +1,3 @@ -MD5 (netams-3.3.5.tar.gz) = 5b76510d2df6cf1e370efbdc1f0a71fd -SHA256 (netams-3.3.5.tar.gz) = fedb4fd3463a87c5a70e2126b9c7d3fc5fe02bccb16977b241f0a38c4055b702 -SIZE (netams-3.3.5.tar.gz) = 338686 +MD5 (netams-3.4.0rc2.tar.gz) = 3093e50f8ee7a297cb8c2bc6bacd0666 +SHA256 (netams-3.4.0rc2.tar.gz) = 7cbfdefa94f075a5dab40613d25738c0e2e40652638338b52632a0efdbc4f68e +SIZE (netams-3.4.0rc2.tar.gz) = 375729 diff --git a/net-mgmt/netams/files/netams.in b/net-mgmt/netams/files/netams.in index b39f5464057d..fb7d48469e38 100644 --- a/net-mgmt/netams/files/netams.in +++ b/net-mgmt/netams/files/netams.in @@ -1,11 +1,16 @@ #!/bin/sh +# # $FreeBSD$ # + # PROVIDE: netams # REQUIRE: NETWORKING # KEYWORD: shutdown -# Add the following line to /etc/rc.conf to enable netams +# Define these netams_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/netams # # netams_enable (bool): Set to "NO" by default. # Set it to "YES" to enable netams. @@ -23,10 +28,10 @@ rcvar=`set_rcvar` load_rc_config $name : ${netams_enable="NO"} -: ${netams_config="/usr/local/etc/netams.cfg"} +: ${netams_config="%%PREFIX%%/etc/netams.cfg"} pidfile="/var/run/netams.pid" -command="/usr/local/libexec/netams" +command="%%PREFIX%%/libexec/netams" command_args="-lf ${netams_config} > /dev/null &" run_rc_command "$1" diff --git a/net-mgmt/netams/files/patch-src__common.c b/net-mgmt/netams/files/patch-src__common.c deleted file mode 100644 index 949a05891b1e..000000000000 --- a/net-mgmt/netams/files/patch-src__common.c +++ /dev/null @@ -1,29 +0,0 @@ ---- ./src/common.c Fri Apr 21 10:25:11 2006 -+++ ./src/common.c Wed Jun 14 13:15:26 2006 -@@ -179,11 +179,21 @@ - - if (flag_syslog) { bzero(str2log2, 256); bzero(str2log1, 256+64); } - -- va_start(ap, fmt); -- if (flag_nodaemon && !flag_quiet) vfprintf(stdout, fmt, ap); -- if (flag_log) vfprintf(LOGFILE, fmt, ap); -- if (flag_syslog) vsnprintf(str2log2,256, fmt, ap); -- va_end(ap); -+ if (flag_nodaemon && !flag_quiet) { -+ va_start(ap, fmt); -+ vfprintf(stdout, fmt, ap); -+ va_end(ap); -+ } -+ if (flag_log) { -+ va_start(ap, fmt); -+ vfprintf(LOGFILE, fmt, ap); -+ va_end(ap); -+ } -+ if (flag_syslog) { -+ va_start(ap, fmt); -+ vsnprintf(str2log2,256, fmt, ap); -+ va_end(ap); -+ } - - if (flag_syslog) { - snprintf(str2log1,256+64,"%s:%u %s", where, id, str2log2); diff --git a/net-mgmt/netams/files/patch-src__ng_netams.c b/net-mgmt/netams/files/patch-src__ng_netams.c deleted file mode 100644 index 455391392ef1..000000000000 --- a/net-mgmt/netams/files/patch-src__ng_netams.c +++ /dev/null @@ -1,25 +0,0 @@ ---- ./src/ng_netams.c Fri Mar 4 04:38:52 2005 -+++ ./src/ng_netams.c Wed Jun 14 11:54:21 2006 -@@ -438,7 +438,10 @@ - } else - prev=e; - } -- if (data->debug) printf("callout/%u%c active %u, checked %u, queued=%u, flushed %u\n", time_second, data->daemon_node?'+':'-', data->active_flows, t_active, f_queued, f_active); -+ if (data->debug) -+ printf("callout/%lu%c active %u, checked %u, queued=%u, flushed %u\n", -+ (u_long)time_second, data->daemon_node?'+':'-', -+ data->active_flows, t_active, f_queued, f_active); - mtx_unlock(&data->mtx_active); - - if (data->daemon_node!=0 && time_second%10==0) { // time to send info to daemon -@@ -446,7 +449,9 @@ - msg->header.token=data->daemon_cookie; - ng_netams_set_info(msg, data); - NG_SEND_MSG_ID(error, data->node, msg, data->daemon_node, NG_NODE_ID(data->node)); -- if (data->debug) printf("info/%u: sent to daemon [%u] with error=%u\n", time_second, data->daemon_node, error); -+ if (data->debug) -+ printf("info/%lu: sent to daemon [%u] with error=%u\n", -+ (u_long)time_second, data->daemon_node, error); - if (error) { data->daemon_cookie=data->daemon_node=0; } // something went wrong, reset userspace destination to prevent further loss - } - diff --git a/net-mgmt/netams/pkg-message b/net-mgmt/netams/files/pkg-message.in index 31cb60263150..31cb60263150 100644 --- a/net-mgmt/netams/pkg-message +++ b/net-mgmt/netams/files/pkg-message.in diff --git a/net-mgmt/netams/pkg-descr b/net-mgmt/netams/pkg-descr index 7c53e29a2ebc..8b2238d66d2f 100644 --- a/net-mgmt/netams/pkg-descr +++ b/net-mgmt/netams/pkg-descr @@ -1,11 +1,10 @@ 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/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. +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. WWW: http://www.netams.com/ diff --git a/net-mgmt/netams/pkg-plist b/net-mgmt/netams/pkg-plist index 7eca933d6c1e..efcea4d19aec 100644 --- a/net-mgmt/netams/pkg-plist +++ b/net-mgmt/netams/pkg-plist @@ -2,6 +2,7 @@ etc/netams.cfg.sample libexec/netams sbin/flowprobe sbin/ipfw2netflow +sbin/ascii2netflow bin/netamsctl %%DATADIR%%/ru-networks.txt.sample %%DATADIR%%/.netamsctl.rc |