pmacct/pmacct.spec

141 lines
4.4 KiB
RPMSpec

Summary: Promiscuous mode IP Accounting package
Name: pmacct
Version: 0.11.0
Release: 0
License: GPL
Group: System/Monitoring
Source0: %{name}-%{version}.tar.bz2
Source1: nfacctd.init
Source2: pmacctd.init
Source3: sfacctd.init
#Patch: pgsql_plugin.c.patch
URL: http://www.pmacct.net/
BuildRoot: %{_tmppath}/%{name}-root
Requires: mysql-shared postgresql-libs sqlite
BuildRequires: mysql-devel postgresql-devel
%if %{?suse_version:1}0
%if %suse_version > 920
BuildRequires: sqlite-devel
%endif
%else
BuildRequires: sqlite-devel
%endif
%if %{?fedora_version:1}0
BuildRequires: kernel
%endif
%if %{?mandriva_version:1}0
Requires: libpcap0
BuildRequires: libpcap0-devel
%else
Requires: libpcap
BuildRequires: libpcap
%endif
%description
pmacct is a small set of passive network monitoring tools to measure, account, classify and aggregate IPv4 and IPv6 traffic; a pluggable and flexible architecture allows to store the collected traffic data into memory tables or SQL (MySQL, SQLite, PostgreSQL) databases. pmacct supports fully customizable historical data breakdown, flow sampling, filtering and tagging, recovery actions, and triggers. Libpcap, sFlow v2/v4/v5 and NetFlow v1/v5/v7/v8/v9 are supported, both unicast and multicast. Also, a client program makes it easy to export data to tools like RRDtool, GNUPlot, Net-SNMP, MRTG, and Cacti.
%prep
%setup -q
#%patch
%build
export CFLAGS="%{optflags}"
export AM_CFLAGS="%{optflags}"
PMACCT_BASE_CONFIG="
--prefix=%{_prefix}
--bindir=%{_bindir}
--sbindir=%{_sbindir}
--sysconfdir=%{_sysconfdir}/%{name}
--enable-64bit
--enable-mysql
--enable-pgsql
%if %{?suse_version:1}0
%if %suse_version > 920
--enable-sqlite3
%endif
--with-pgsql-includes=/usr/include/pgsql/
%endif
%if %{?mandriva_version:1}0
--with-pgsql-includes=/usr/include/pgsql/
--with-pcap-includes=/usr/include/
%endif
"
./configure $PMACCT_BASE_CONFIG
make
%install
%{__rm} -rf %{buildroot}
%makeinstall
%{__install} -Dpm555 %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd
%{__install} -Dpm555 %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd
%{__install} -Dpm555 %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd
ln -sf ../../etc/init.d/nfacctd $RPM_BUILD_ROOT/usr/sbin/rcnfacctd
ln -sf ../../etc/init.d/pmacctd $RPM_BUILD_ROOT/usr/sbin/rcpmacctd
ln -sf ../../etc/init.d/sfacctd $RPM_BUILD_ROOT/usr/sbin/rcsfacctd
%{__install} -Dpm555 examples/nfacctd-sql.conf.example %{buildroot}/%{_sysconfdir}/pmacct/nfacctd.conf
%{__install} -Dpm555 examples/pmacctd-sql.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf
touch %{buildroot}/%{_sysconfdir}/pmacct/sfacctd.conf
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog CONFIG-KEYS COPYING EXAMPLES FAQS INSTALL KNOWN-BUGS NEWS README TODO TOOLS UPGRADE docs examples sql
%defattr(-, root, root, 0755)
%{_bindir}/*
%{_sbindir}/*
%{_sysconfdir}/init.d/*
%config(noreplace) %{_sysconfdir}/pmacct/nfacctd.conf
%config(noreplace) %{_sysconfdir}/pmacct/pmacctd.conf
%config(noreplace) %{_sysconfdir}/pmacct/sfacctd.conf
%changelog
* Tue May 16 2006 Peter Nixon <peter+rpmspam@suntel.com.tr> 0.10.1
- Cleaned up SPEC file a some more and updated to 0.10.1
* Wed May 10 2006 Peter Nixon <peter+rpmspam@suntel.com.tr> 0.10.0
- Fixup spec file to work properly on SUSE Build system
* Tue Dec 27 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.6-2
- fixed package descriptions and conflicts for alldb
* Tue Dec 27 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.6-1
- upgraded to 0.9.6
- split database backends into separate binaries
- added 64bit counter support by default
* Fri Dec 08 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.5-1
- upgraded to 0.9.5
- removed shortver
* Mon Nov 13 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.4p1-1
- upgraded to 0.9.4p1
- defined shortver since directory didn't change
* Mon Nov 13 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.4-1
- upgraded to 0.9.4
* Tue Oct 12 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.3-1
- upgraded to 0.9.3
* Tue Aug 23 2005 Douglas E. Warner <silfreed@silfreed.net> 0.9.1-1
- upgraded to 0.9.1
* Tue May 24 2005 Douglas E. Warner <silfreed@silfreed.net> 0.8.6-2
- changed 'libmysqlclient' Require to 'mysql'
* Mon May 23 2005 Douglas E. Warner <silfreed@silfreed.net> 0.8.6-1
- removed epoch (old versions won't upgrade correctly)
- upgraded to 0.8.6
* Sat Apr 10 2004 Douglas E. Warner <dwarner@ctinetworks.com>
- Initial RPM release.