mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-27 10:03:20 +00:00
- Update to 3.3.5
- Provide rc_subr script PR: ports/98636 Submitted by: Yuriy Shkandybin <jura@netams.com> (maintainer)
This commit is contained in:
parent
80f7463135
commit
96769ea325
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=165400
@ -6,7 +6,7 @@
|
||||
#
|
||||
|
||||
PORTNAME= netams
|
||||
PORTVERSION= 3.3.2
|
||||
PORTVERSION= 3.3.5
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \
|
||||
http://www.netams.com/files/
|
||||
@ -16,9 +16,10 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}
|
||||
MAINTAINER= jura@netams.com
|
||||
COMMENT= Network Traffic Accounting and Monitoring Software
|
||||
|
||||
NO_PACKAGE= "Depends on kernel"
|
||||
NO_PACKAGE= Depends on kernel
|
||||
|
||||
USE_SUBMAKE= yes
|
||||
USE_RC_SUBR= netams.sh
|
||||
MANCOMPRESSED= no
|
||||
|
||||
SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
||||
@ -30,11 +31,11 @@ SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
||||
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
|
||||
plan.cgi russian.res unit.cgi cardtool.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
|
||||
netams_graph.cgi activate.cgi activate.tmpl
|
||||
IMAGES= logo.gif logo_sm.jpg admintool-logo.gif showtable-logo.gif
|
||||
MAN8= netams.8 flowprobe.8 netamsctl.8
|
||||
|
||||
SYSDIR?= /sys
|
||||
@ -45,9 +46,9 @@ OPTIONS= DEBUG "Build with debug symbols" off \
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !exists(${SYSDIR})
|
||||
IGNORE= could not find the kernel sources in ${SYSDIR}. Please define SYSDIR
|
||||
.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' \
|
||||
@ -70,20 +71,11 @@ post-patch:
|
||||
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/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
|
||||
${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg ${PREFIX}/etc/netams.cfg.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/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
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (netams-3.3.2.tar.gz) = 74ea7a851c644f3bee98674504d2a58d
|
||||
SHA256 (netams-3.3.2.tar.gz) = 8286816a9cb626f55908f55737b5e5eaf4b6beef910d6e931980b882a1d39a9e
|
||||
SIZE (netams-3.3.2.tar.gz) = 327600
|
||||
MD5 (netams-3.3.5.tar.gz) = 5b76510d2df6cf1e370efbdc1f0a71fd
|
||||
SHA256 (netams-3.3.5.tar.gz) = fedb4fd3463a87c5a70e2126b9c7d3fc5fe02bccb16977b241f0a38c4055b702
|
||||
SIZE (netams-3.3.5.tar.gz) = 338686
|
||||
|
37
net-mgmt/netams/files/netams.sh.in
Normal file
37
net-mgmt/netams/files/netams.sh.in
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
|
||||
# PROVIDE: netams
|
||||
# REQUIRE: NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# 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.
|
||||
# netams_config (str): Custom configuration file to be passed
|
||||
# to netams.
|
||||
#
|
||||
# DO NOT CHANGE THESE DEFAULT VALUES HERE
|
||||
#
|
||||
netams_enable=${netams_enable-"NO"}
|
||||
netams_config=${netams_config-"%%PREFIX%%/etc/netams.cfg"}
|
||||
|
||||
netams_pidfile="/var/run/netams.pid"
|
||||
|
||||
. %%RC_SUBR%%
|
||||
|
||||
name="netams"
|
||||
rcvar=`set_rcvar`
|
||||
command="%%PREFIX%%/libexec/netams"
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
pidfile="${netams_pidfile}"
|
||||
|
||||
start_cmd="echo \"Starting ${name}.\"; ${command} -ldf ${netams_config} > /dev/null"
|
||||
|
||||
run_rc_command "$1"
|
29
net-mgmt/netams/files/patch-src__common.c
Normal file
29
net-mgmt/netams/files/patch-src__common.c
Normal file
@ -0,0 +1,29 @@
|
||||
--- ./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);
|
25
net-mgmt/netams/files/patch-src__ng_netams.c
Normal file
25
net-mgmt/netams/files/patch-src__ng_netams.c
Normal file
@ -0,0 +1,25 @@
|
||||
--- ./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
|
||||
}
|
||||
|
@ -2,9 +2,6 @@
|
||||
|
||||
The NeTAMS package has been successfully installed.
|
||||
|
||||
To use the programm, make a copy of %%PREFIX%%/etc/rc.d/netams.sh.sample under
|
||||
%%PREFIX%%/etc/rc.d/netams.sh and do:
|
||||
chmod +x %%PREFIX%%/etc/rc.d/netams.sh
|
||||
Check %%DATADIR%% and http://www.netams.com for examples.
|
||||
|
||||
A sample configuration file has been installed to %%PREFIX%%/etc as
|
||||
@ -17,7 +14,6 @@ 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
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
@ -1,8 +1,4 @@
|
||||
@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
|
||||
sbin/ipfw2netflow
|
||||
@ -16,9 +12,12 @@ bin/netamsctl
|
||||
%%DATADIR%%/cgi-bin/netams_example.cgi
|
||||
%%DATADIR%%/cgi-bin/usertool.cgi
|
||||
%%DATADIR%%/cgi-bin/admintool.cgi
|
||||
%%DATADIR%%/cgi-bin/activate.cgi
|
||||
%%DATADIR%%/cgi-bin/activate.tmpl
|
||||
%%DATADIR%%/cgi-bin/login.cgi
|
||||
%%DATADIR%%/cgi-bin/netams_graph.cgi
|
||||
%%DATADIR%%/cgi-bin/admin/.htaccess
|
||||
%%DATADIR%%/cgi-bin/admin/cardtool.cgi
|
||||
%%DATADIR%%/cgi-bin/admin/index.cgi
|
||||
%%DATADIR%%/cgi-bin/admin/policy.cgi
|
||||
%%DATADIR%%/cgi-bin/admin/showusercard.cgi
|
||||
@ -37,8 +36,8 @@ bin/netamsctl
|
||||
%%DATADIR%%/cgi-bin/admin/russian.res
|
||||
%%DATADIR%%/cgi-bin/admin/unit.cgi
|
||||
%%DATADIR%%/cgi-bin/images/admintool-logo.gif
|
||||
%%DATADIR%%/cgi-bin/images/logo-small.gif
|
||||
%%DATADIR%%/cgi-bin/images/logo.gif
|
||||
%%DATADIR%%/cgi-bin/images/logo_sm.jpg
|
||||
%%DATADIR%%/cgi-bin/images/showtable-logo.gif
|
||||
@dirrm %%DATADIR%%/cgi-bin/images
|
||||
@dirrm %%DATADIR%%/cgi-bin/admin
|
||||
|
Loading…
Reference in New Issue
Block a user