%define name ipac %define version 1.09 %define release 2 Name: %{name} Version: %{version} Release: %{release} Vendor: Moritz Both URL: http://www.comlink.apc.org/~moritz/ipac.html Source: %{name}-%{version}.tar.gz Source1: ipac.init Source2: %{name}-cron-0.1.tar.gz Group: Applications/Internet Group(cs): Aplikace/Internet Copyright: GPL Summary: ipac - summarize and nicely output the IP accounting data. Summary(cs): ipac - sbírání a prezentace statistik IP provozu BuildRoot: /var/tmp/%{name}-%{version}-root Requires: ipchains Prereq: chkconfig %description ipac is a package which is designed to summarize and nicely output the IP accounting data. ipac runs on top of the ipfwadm tool ipac consists of three scripts (sh and perl): ipacset - reads a config file and sets up ip accounting for the kernel using ipfwadm fetchipac - executed from cron once in a while, reads the current ip accounting data assembled by the kernel and writes it to a new file; the file also gets information about which filter should filter what ipacsum - summarizes the data from a set of files and, optionally, replaces these files by one. %description -l cs Balíček ipac obsahuje nástroje pro získávání a zpracování dat o IP provozu a jeho přehledném zpracování. Balíček využívá ipchains. Obsahuje tři skripty (shell a perl): ipacset - čte konfigurační soubor a nastavuje účtování v jádře Linuxu fetchipac - je spouštěn periodicky z cronu, čte aktuální data a zapíše je do souboru ipacsum - zpracovává uchovaná data %prep %setup -q perl -pi -e 's/(INSTALLPATH).*$/$1 \/usr\/sbin/;' \ -e 's/(IMANPATH).*$/$1 \/usr\/man\/man8/;' config # and now scripts for cron %setup -D -T -a 2 %build make clean make # man pages should be compressed gzip -9 *.8 # we want real config empty (and orig in DOC dir) mv ipac.conf ipac.conf.orig sed -n '1,15p' ipac.conf.orig > ipac.conf %install [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/sbin \ $RPM_BUILD_ROOT/var/log/ip-acct \ $RPM_BUILD_ROOT/etc/rc.d/init.d \ $RPM_BUILD_ROOT/usr/man/man8 install -m 755 fetchipac $RPM_BUILD_ROOT/usr/sbin install -m 755 ipacset $RPM_BUILD_ROOT/usr/sbin install -m 755 ipacsum $RPM_BUILD_ROOT/usr/sbin install -m 644 ipac.conf $RPM_BUILD_ROOT/etc install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ipac cp *.8.gz $RPM_BUILD_ROOT/usr/man/man8 cp -av etc $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/%{name}-%{version} %post /sbin/chkconfig --add ipac %preun if [ $1 = 0 ]; then /sbin/chkconfig --del ipac fi %files %defattr (644,root,root,755) %doc CHANGES COPYING README UPDATE ipac.conf.orig %doc /usr/man/man8/* %config /etc/ipac.conf %defattr (755,root,root,755) %config /etc/rc.d/init.d/ipac /usr/sbin/fetchipac /usr/sbin/ipacset /usr/sbin/ipacsum /etc/cron.*/* %dir /var/log/ip-acct %changelog * Mon Jul 3 2000 Milan Kerslager - smarter cron scripts * Fri Jun 23 2000 Milan Kerslager - updated to 1.09, cleaned up * Thu Aug 06 1998 Arkadiusz Miśkiewicz - updated to 0.99 * Thu Jul 16 1998 Arkadiusz Miśkiewicz - initial package release