File netams.spec of Package NeTAMS
#
# spec file for NeTAMS (Version 3.4.2c)
#
# Copyright (c) 2009 SOAD Project, Russia.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bug fixes or comments to the Maintainer: sda00@himki.net
#
# Access to the development branch via cvs:
# cvs -d :pserver:netams@netams.com:/netams/cvs checkout netams
#
# Access to the stable branch via cvs:
# cvs -d :pserver:netams@netams.com:/netams/cvs checkout -r STABLE netams
#
# norootforbuild
Name: netams
Version: 3.4.2c
Release: 1
License: GPL v3
Source: %{name}-%{version}.tar.gz
Source1: %{name}-doc-ru.tar.gz
Source2: netams.init.d
Patch0: netams_patch0
Patch1: netams_patch1
Group: Productivity/Networking/Other
Summary: Network Traffic Accounting and Management Service
BuildRequires: iptables-devel libpcap-devel libmysqlclient-devel openssl-devel gcc gcc-c++ pam-devel postgresql-devel
Requires: iptables libpcap apache2 iptables-devel libpcap-devel mysql mysql-client
URL: http://www.netams.com/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Packager: sda00 <sda00@himki.net>
%if %suse_version > 1100
BuildRequires: -post-build-checks -brp-check-suse
%endif
%description
NeTAMS is a Network Traffic Accounting and Monitoring Software. It
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.
Note from packager:
This is NOT for DUMMIES! The "www" part is installed into "/srv/www"
because it'd take less time to adjust Apache's DocRoot then tweak
various configuration files. After installation do smth. like this:
cd /srv/www/netams
find ./ -type f -print -exec grep \/var\/www\/ {} \;
and MANUALLY set the current location! Also check "/etc/netams-apache/"
folder :).
P.S. it works here...
%package netams-doc-ru
Summary: Russian Documentation for NeTAMS
Group: Productivity/Networking/Other
%description netams-doc-ru
NeTAMS is a Network Traffic Accounting and Monitoring Software. It
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.
This package contain complete Russian documentation for NeTAMS
%prep
%setup -q
%patch0
%patch1
chmod 644 doc/*.8
%build
./configure.sh $RPM_BUILD_ROOT
make
%install
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/netams-apache
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/init.d
mkdir -p -m 755 $RPM_BUILD_ROOT/var/log
mkdir -p -m 755 $RPM_BUILD_ROOT/srv/www/htdocs/netams
mkdir -p -m 755 $RPM_BUILD_ROOT/usr/sbin
mkdir -p -m 755 $RPM_BUILD_ROOT/usr/share/man/man8
make install
cp %{SOURCE2} $RPM_BUILD_ROOT/etc/init.d/
chmod +x $RPM_BUILD_ROOT/etc/init.d/netams.init.d
cd %{buildroot}%{_sbindir}/
ln -s ../../etc/init.d/netams.init.d ./rcnetams
cd -
mkdir -p %{buildroot}%{_docdir}/%{name}
cd %{buildroot}%{_docdir}/%{name}/
tar xfm %{SOURCE1}
cd -
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
%postun
%insserv_cleanup
%preun
%stop_on_removal
%files
%defattr(-,root,root)
##{_sysconfdir}/netams-apache
%{_sysconfdir}/*
%{_sysconfdir}/.netamsctl.rc
%{_initrddir}/*
%{_sbindir}/*
%{_mandir}/man8/*
/srv/www/netams
%files netams-doc-ru
%defattr(-,root,root)
%{_docdir}/%{name}
%changelog
* Wed Mar 25 2009 overall cleanup of a spec by sda00
- first build for oS-11.1