2006-06-10 11:58:53 +00:00
|
|
|
Summary: Promiscuous mode IP Accounting package
|
|
|
|
Name: pmacct
|
2010-07-30 06:12:43 +00:00
|
|
|
Version: 0.12.3
|
2006-06-10 11:58:53 +00:00
|
|
|
Release: 0
|
|
|
|
License: GPL
|
2006-11-14 11:47:00 +00:00
|
|
|
Group: Productivity/Networking/Diagnostic
|
2010-02-17 19:37:58 +00:00
|
|
|
# http://www.pmacct.net/pmacct-%{version}.tar.gz
|
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2006-06-10 11:58:53 +00:00
|
|
|
Source1: nfacctd.init
|
|
|
|
Source2: pmacctd.init
|
|
|
|
Source3: sfacctd.init
|
2010-02-17 19:37:58 +00:00
|
|
|
Patch1: pmacct-fix_realloc.patch
|
2006-06-10 11:58:53 +00:00
|
|
|
URL: http://www.pmacct.net/
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
2006-06-21 13:30:52 +00:00
|
|
|
BuildRequires: mysql-devel postgresql-devel
|
2009-08-12 16:04:18 +00:00
|
|
|
BuildRequires: sqlite-devel >= 3.0.0
|
2009-08-12 16:06:14 +00:00
|
|
|
BuildRequires: libpcap-devel
|
2006-06-10 11:53:34 +00:00
|
|
|
|
|
|
|
%description
|
2010-02-17 19:37:58 +00:00
|
|
|
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.
|
2006-06-10 11:53:34 +00:00
|
|
|
|
|
|
|
%prep
|
2006-06-10 11:58:53 +00:00
|
|
|
%setup -q
|
2010-02-17 19:37:58 +00:00
|
|
|
%patch1
|
2009-08-12 16:38:54 +00:00
|
|
|
chmod a+rx docs examples sql
|
|
|
|
find docs examples sql -type f -print0 | xargs -r0 chmod -x
|
2006-08-28 19:31:16 +00:00
|
|
|
|
2006-06-10 11:53:34 +00:00
|
|
|
%build
|
2009-08-12 16:38:54 +00:00
|
|
|
%configure \
|
|
|
|
--sysconfdir=%{_sysconfdir}/%{name} \
|
|
|
|
--enable-threads \
|
|
|
|
--enable-64bit \
|
|
|
|
--enable-mysql \
|
|
|
|
--enable-pgsql \
|
|
|
|
--enable-sqlite3 \
|
2010-02-17 19:37:58 +00:00
|
|
|
--enable-ulog \
|
|
|
|
--enable-ipv6 \
|
|
|
|
--enable-v4-mapped \
|
2006-06-24 11:03:31 +00:00
|
|
|
--with-pgsql-includes=/usr/include/pgsql/
|
2006-06-10 11:58:53 +00:00
|
|
|
|
2010-02-17 19:37:58 +00:00
|
|
|
%__make %{?jobs:-j%{jobs}}
|
2006-06-10 11:53:34 +00:00
|
|
|
|
|
|
|
%install
|
2006-06-10 11:58:53 +00:00
|
|
|
%makeinstall
|
|
|
|
|
2009-08-12 16:38:54 +00:00
|
|
|
%{__install} -Dp %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd
|
|
|
|
%{__install} -Dp %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd
|
|
|
|
%{__install} -Dp %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd
|
2006-06-10 11:58:53 +00:00
|
|
|
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
|
|
|
|
|
2009-08-12 16:38:54 +00:00
|
|
|
%{__install} -Dp examples/nfacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/nfacctd.conf
|
|
|
|
%{__install} -Dp examples/pmacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf
|
2006-06-21 12:27:19 +00:00
|
|
|
touch %{buildroot}/%{_sysconfdir}/pmacct/sfacctd.conf
|
2006-06-10 11:53:34 +00:00
|
|
|
|
|
|
|
%clean
|
2006-06-10 11:58:53 +00:00
|
|
|
%{__rm} -rf %{buildroot}
|
2006-06-10 11:53:34 +00:00
|
|
|
|
|
|
|
%files
|
2006-06-10 11:58:53 +00:00
|
|
|
%defattr(-, root, root)
|
2009-08-12 18:29:24 +00:00
|
|
|
%doc AUTHORS ChangeLog CONFIG-KEYS COPYING EXAMPLES FAQS INSTALL KNOWN-BUGS NEWS README TODO TOOLS UPGRADE
|
|
|
|
%doc docs examples sql
|
2009-08-11 20:15:12 +00:00
|
|
|
%attr(755,root,root) %{_bindir}/*
|
|
|
|
%attr(755,root,root) %{_sbindir}/*
|
2006-06-21 12:18:11 +00:00
|
|
|
%{_sysconfdir}/init.d/*
|
2009-08-11 20:15:12 +00:00
|
|
|
%dir /etc/pmacct
|
|
|
|
%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/nfacctd.conf
|
|
|
|
%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/pmacctd.conf
|
|
|
|
%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/sfacctd.conf
|
2006-06-10 11:58:53 +00:00
|
|
|
|
|
|
|
%changelog
|