Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jan 2003 13:48:42 +0300 (MSK)
From:      jura@happychance.com
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/46777: New port: NeTAMS - Network Traffic Accounting and Monitoring Software
Message-ID:  <200301051048.h05AmgQ2035178@magnolia.happychance.com>

next in thread | raw e-mail | index | archive | help

>Number:         46777
>Category:       ports
>Synopsis:       New port: NeTAMS - Network Traffic Accounting and Monitoring Software
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 05 02:50:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yuriy N. Shkandybin
>Release:        FreeBSD 4.7-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD magnolia.happychance.com 4.7-RELEASE-p1 FreeBSD 4.7-RELEASE-p1 #8: Fri Nov 1 14:37:59 MSK 2002 root@magnolia.happychance.com:/usr/obj/usr/src/sys/MAGNOLIA i386


	
>Description:
	NeTAMS is a Network Traffic Accounting and Monitoring Software.
	It runs as a daemon under FreeBSD and Linux operating systems.
	Collects an IP traffic information flowing via your PC/UNIX or Cisco router,
	filters it, aggregates, stores onto HASH/SQL database,
	and makes SMTP/HTML reports to site administrator.
	Anoter features are flexible policy targets, firewalling, access control,
	quotas, scheduler and much much more.

	WWW: http://www.inorg.chem.msu.ru/anton/netams/

>How-To-Repeat:
	
>Fix:

# 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:
#
#	netams
#	netams/files
#	netams/files/netams.sh
#	netams/files/patch-aa
#	netams/scripts
#	netams/scripts/configure
#	netams/distinfo
#	netams/pkg-comment
#	netams/pkg-descr
#	netams/pkg-message
#	netams/pkg-plist
#	netams/Makefile
#
echo c - netams
mkdir -p netams > /dev/null 2>&1
echo c - netams/files
mkdir -p netams/files > /dev/null 2>&1
echo x - netams/files/netams.sh
sed 's/^X//' >netams/files/netams.sh << 'END-of-netams/files/netams.sh'
X#!/bin/sh
X
Xcase "$1" in
X
Xstart)
X	sleep 3;
X        /bin/mkdir -p /var/run/netams
X        if [ -x /usr/local/libexec/netams ]; then
X		if [ -f /usr/local/etc/netams.conf ]; then
X                	/usr/local/libexec/netams -lf /usr/local/etc/netams.conf >/dev/null && echo -n ' NetAMS'
X        	fi
X	fi
X        ;;
X
Xstop)
X        killall netams
X	rmdir /var/run/netams
X        ;;
X*)
X        echo "$0 start | stop"
X        ;;
X
Xesac
X
X
X
END-of-netams/files/netams.sh
echo x - netams/files/patch-aa
sed 's/^X//' >netams/files/patch-aa << 'END-of-netams/files/patch-aa'
X*** addon/netams-startup.sh.orig      Sun Dec 15 14:42:13 2002
X--- addon/netams-startup.sh      Mon Dec 16 17:07:08 2002
X***************
X5c5
X< debug=1
X---
X> debug=0
X7,8c7,8
X< configfile=/home/anton/netams/netams.cfg
X< appfile=/home/anton/netams/netams
X---
X> configfile=/usr/local/etc/netams.conf
X> appfile=/usr/local/libexec/netams
X10c10
X< path=/tmp
X---
X> path=/var/log
X87c87
X<
X---
X>         sleep 3;
X
END-of-netams/files/patch-aa
echo c - netams/scripts
mkdir -p netams/scripts > /dev/null 2>&1
echo x - netams/scripts/configure
sed 's/^X//' >netams/scripts/configure << 'END-of-netams/scripts/configure'
X#! ${SH}
X#
X# $FreeBSD$
X
XPATH_TO_CONFIG="${PREFIX}/etc/natams.conf"
XPATH_TO_LOG="/var/log/netams.log"
XFLAGS="-g"
X
Xcd ${WRKSRC}
X    rm -f Makefile.new
X    cp Makefile Makefile.orig
X    grep -v "^LIB" Makefile > Makefile.new || exit 1
X    grep -v "^DEFINE" Makefile.new  > Makefile || exit 1
X    grep -v "^PATH_TO_CONFIG" Makefile > Makefile.new || exit 1
X    grep -v "^PATH_TO_LOG" Makefile.new > Makefile || exit 1
X    grep -v "^FLAGS" Makefile > Makefile.new || exit 1
X    grep -v "^CFLAGS" Makefile.new > Makefile || exit 1
X    echo "PATH_TO_CONFIG=${PATH_TO_CONFIG}" > Makefile.new || exit 1
X    echo "PATH_TO_LOG=${PATH_TO_LOG}" >> Makefile.new || exit 1
X    echo "LIB=${LIB}" >> Makefile.new || exit 1
X    echo "DEFINE=${DEFINE}" >> Makefile.new || exit 1
X    echo "FLAGS=${FLAGS}" >> Makefile.new || exit 1
X    echo 'CFLAGS  = $(FLAGS) -I$(INCLUDE) $(DEFINE)' >> Makefile.new || exit 1
X    cat Makefile >> Makefile.new || exit 1
X    mv -f Makefile.new Makefile || exit 1
X
END-of-netams/scripts/configure
echo x - netams/distinfo
sed 's/^X//' >netams/distinfo << 'END-of-netams/distinfo'
XMD5 (netams-3.1.1376.tar.gz) = cf8e0f63a9c0a406500ed7a6c1fa2c53
END-of-netams/distinfo
echo x - netams/pkg-comment
sed 's/^X//' >netams/pkg-comment << 'END-of-netams/pkg-comment'
XNetwork Traffic Accounting and Monitoring Software
END-of-netams/pkg-comment
echo x - netams/pkg-descr
sed 's/^X//' >netams/pkg-descr << 'END-of-netams/pkg-descr'
XNeTAMS is a Network Traffic Accounting and Monitoring Software. 
XIt runs as a daemon under FreeBSD and Linux operating systems. 
XCollects an IP traffic information flowing via your PC/UNIX or Cisco router, 
Xfilters it, aggregates, stores onto HASH/SQL database, 
Xand makes SMTP/HTML reports to site administrator.
XAnoter features are flexible policy targets, firewalling, access control,  
Xquotas, scheduler and much much more.
X
XWWW: http://www.inorg.chem.msu.ru/anton/netams/
END-of-netams/pkg-descr
echo x - netams/pkg-message
sed 's/^X//' >netams/pkg-message << 'END-of-netams/pkg-message'
X--------------------------------------------------------------------------
X
XThe NetAMS package has been successfully installed.
X
XTo use the programm, make a copy of %%PREFIX%%/etc/rc.d/netams.sh.sample under
X%%PREFIX%%/etc/rc.d/netams.sh and do: chmod +x %%PREFIX%%/etc/rc.d/netams.sh.
XCheck %%EXAMPLESDIR%% for examples.
X
XA sample configuration file has been installed to %%PREFIX%%/etc as
X"netams.conf.sample". This may be renamed to "netams.conf" and edited.
X
XIn order to use the netamsctl programs, a user must copy 
X%%EXAMPLESDIR%%/.netamsctl.rc to home directory and edit.
X
X--------------------------------------------------------------------------
END-of-netams/pkg-message
echo x - netams/pkg-plist
sed 's/^X//' >netams/pkg-plist << 'END-of-netams/pkg-plist'
X@unexec if cmp -s %D/etc/netams.conf.sample %D/etc/netams.conf; then rm -f %D/etc/netams.conf; fi
Xetc/netams.conf.sample
Xetc/rc.d/netams.sh.sample
Xlibexec/netams
Xbin/netamsctl
X%%PORTDOCS%%share/doc/netams/documentation-en.html
X%%PORTDOCS%%share/doc/netams/diagram-1.gif
X%%PORTDOCS%%share/doc/netams/logo.gif
X%%PORTDOCS%%share/doc/netams/net-1-1a.gif
X%%PORTDOCS%%share/doc/netams/net-1-2a.gif
X%%PORTDOCS%%share/doc/netams/net-1-3a.gif
Xshare/examples/netams/netams-nat-network.cfg
Xshare/examples/netams/netams-netflow.cfg
Xshare/examples/netams/netams-simple.cfg
Xshare/examples/netams/netams.cfg
Xshare/examples/netams/.netamsctl.rc
Xshare/examples/netams/cgi-bin/logo.gif
Xshare/examples/netams/cgi-bin/lucon.ttf
Xshare/examples/netams/cgi-bin/netams_api.pl
Xshare/examples/netams/cgi-bin/netams_example.cgi
Xshare/examples/netams/cgi-bin/netams_graph.cgi
Xshare/examples/netams/cgi-bin/weblogin.cgi
Xshare/examples/netams/cgi-bin/weblogin.tem
X%%PORTDOCS%%@dirrm share/doc/netams
X@dirrm share/examples/netams/cgi-bin
X@dirrm share/examples/netams
X
END-of-netams/pkg-plist
echo x - netams/Makefile
sed 's/^X//' >netams/Makefile << 'END-of-netams/Makefile'
X# New ports collection makefile for: NetAMS
X# Date created:        9 December 2002
X# Whom: 	       jura@happychance.com
X#
X# $FreeBSD$
X#
X
XPORTNAME=	netams
XPORTVERSION=	3.1
XCATEGORIES=	net
XMASTER_SITES=	http://www.inorg.chem.msu.ru/anton/netams/
XDISTNAME=	netams-3.1.1376
X
XMAINTAINER=	jura@happychance.com
X
X.if !defined(WITHOUT_MYSQL)
XLIB_DEPENDS=	mysqlclient.10:${PORTSDIR}/databases/mysql323-client
X.endif
X
XMAN8=           netams.8
XMANCOMPRESSED=  no
X
XWRKSRC=		${WRKDIR}/netams
X
XDEFINE=		-DFREEBSD
XLIB=		-pthread -lpcap -lutil
X
X.if !defined(WITHOUT_MYSQL)
XDEFINE+=	-DUSE_MYSQL
XLIB+=		-l mysqlclient -L${LOCALBASE}/lib/mysql
X.endif
X.if defined(LOG_DROP)
XDEFINE+=	-DLOG_DROP
X.endif
X.if defined(MAX_QUOTA)
XDEFINE+=	-DMAX_QUOTA=${MAX_QUOTA}
X.else
XDEFINE+=	-DMAX_QUOTA=32
X.endif
X
XSCRIPTS_ENV='DEFINE=${DEFINE}' 'LIB=${LIB}'
X
X.include <bsd.port.pre.mk>
X.if ${OSVERSION} >= 500000
X.endif
X
Xdo-install:
X	@ ${INSTALL_PROGRAM} ${WRKSRC}/src/netams ${PREFIX}/libexec/netams
X	@ ${INSTALL_PROGRAM} ${WRKSRC}/src/netamsctl ${PREFIX}/bin/netamsctl
X	@ ${INSTALL_DATA} ${WRKSRC}/addon/netams.cfg ${PREFIX}/etc/netams.conf.sample
X	@ ${INSTALL_SCRIPT} ${FILESDIR}/netams.sh ${PREFIX}/etc/rc.d/netams.sh.sample
X	@ ${INSTALL_MAN} ${WRKSRC}/doc/netams.8 ${PREFIX}/man/man8
X	@ ${MKDIR} ${EXAMPLESDIR}/cgi-bin
X	@ ${INSTALL_DATA} ${WRKSRC}/addon/.netamsctl.rc ${EXAMPLESDIR}/
X.for example in netams-nat-network.cfg netams-netflow.cfg netams.cfg netams-simple.cfg
X	@ ${INSTALL_DATA} ${WRKSRC}/doc/${example} ${EXAMPLESDIR}/
X.endfor
X.for cgi in logo.gif netams_api.pl netams_graph.cgi weblogin.tem lucon.ttf netams_example.cgi weblogin.cgi
X	 @ ${INSTALL_DATA} ${WRKSRC}/cgi-bin/${cgi} ${EXAMPLESDIR}/cgi-bin/
X.endfor
X.if !defined(NOPORTDOCS)
X	@ ${MKDIR} ${DOCSDIR}
X.for doc in documentation-en.html diagram-1.gif net-1-1a.gif net-1-2a.gif net-1-3a.gif logo.gif
X	@ ${INSTALL_DATA} ${WRKSRC}/doc/${doc} ${DOCSDIR}/
X.endfor
X.endif
X
Xpost-install:
X	@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message|${SED} 's|%%EXAMPLESDIR%%|${EXAMPLESDIR}|g'
X
X.include <bsd.port.post.mk>
END-of-netams/Makefile
exit
--- TMP ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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