%define name netacct-mysql %define version 0.76 %define release 2mdk Summary: Network traffic accounting daemon Name: %{name} Version: %{version} Release: %{release} License: GPL Group: System/Servers URL: http://netacct-mysql.gabrovo.com/ Source0: %{name}-%{version}.tar.bz2 Patch0: %{name}-initscript.patch.bz2 PreReq: rpm-helper BuildRequires: MySQL-devel BuildRequires: libpcap-devel >= 0.7 BuildRoot: %{_tmppath}/%{name}-buildroot %description Traffic Accounting Daemon with mysql support Network traffic accounting daemon which stores data in mysql. Support for per hour statistics, peering/international traffic accounting. %prep %setup -q %patch0 -p0 %build %configure2_5x %make %install [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} # don't fiddle with the initscript! export DONT_GPRINTIFY=1 %makeinstall_std install -d %{buildroot}%{_initrddir} install -m0755 contrib/nacctd.redhat %{buildroot}%{_initrddir}/%{name} %post %_post_service %{name} %preun %_preun_service %{name} %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS FAQ INSTALL NEWS README* TODO netacct.sql %doc contrib/nacctpeering.* contrib/mrta2netacct %attr(0755,root,root) %config(noreplace) %{_initrddir}/%{name} %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/nacctpeering %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/naccttab %{_mandir}/man8/nacctd.8* %{_mandir}/man8/nacctpeering.8* %{_sbindir}/nacctd %changelog * Tue Jan 25 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.76-2mdk - rebuilt against MySQL-4.1.x system libs * Sun May 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.76-1mdk - 0.76 - new url, fix deps, use macros - drop P1, it's included * Wed Mar 12 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.75-3mdk - fix buildrequires - add pl2 patch (P1) - misc spec fixes * Thu Jan 16 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.75-2mdk - build release * Sun Sep 29 2002 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.75-1mdk - initial cooker contrib