1 Summary: Network traffic tracking tool
2 Summary(pl.UTF-8): Narzędzie do śledzenia ruchu sieciowego
7 Group: Networking/Admin
8 Source0: http://dl.sourceforge.net/bandwidthd/%{name}-%{version}.tgz
9 # Source0-md5: aa79aad7bd489fd2cae1f7dc086ca8b6
11 Source2: %{name}.sysconfig
13 Patch0: %{name}-makefile.patch
14 Patch1: %{name}-pgsql.patch
15 Patch2: %{name}-path.patch
16 URL: http://bandwidthd.sourceforge.net/
17 BuildRequires: autoconf
18 BuildRequires: gd-devel
19 BuildRequires: libpcap-devel
20 BuildRequires: libpng-devel
21 BuildRequires: rpmbuild(macros) >= 1.268
22 Requires(post,preun): /sbin/chkconfig
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define _htmldir /home/services/httpd/html/bandwidthd
30 BandwidthD tracks usage of TCP/IP network subnets and builds html
31 files with graphs to display utilization. Charts are built by
32 individual IPs, and by default display utilization over 2 day, 8 day,
33 40 day, and 400 day periods. Furthermore, each ip address's
34 utilization can be logged out at intervals of 3.3 minutes, 10 minutes,
35 1 hour or 12 hours in cdf format, or to a backend database server.
36 HTTP, TCP, UDP, ICMP, VPN, and P2P traffic are color coded.
38 %description -l pl.UTF-8
39 BandwidthD śledzi użycie sieci TCP/IP i buduje pliki HTML
40 wyświetlające ruch sieciowy. Wykresy pokazują IP użytkowników i
41 domyślnie wyświetlają zużycie na przestrzeni 2, 8, 40 i 400 dni.
42 Ponadto udział każdego adresu IP w ruchu sieciowym może być zapisywany
43 w przedziałach 3.3 minut, 10 minut, 1 godziny lub 12 godzin w formacie
44 cdf, albo zapisywany do bazy danych. Ruch HTTP, TCP, UDP, ICMP, VPN, i
45 P2P jest kodowany w różnych kolorach.
61 rm -rf $RPM_BUILD_ROOT
62 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_htmldir},/etc/{sysconfig,rc.d/init.d,cron.d}}
64 install bandwidthd $RPM_BUILD_ROOT%{_sbindir}
65 install htdocs/* $RPM_BUILD_ROOT%{_htmldir}
66 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bandwidthd
67 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bandwidthd
68 install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
70 cat << 'EOF' > $RPM_BUILD_ROOT/etc/cron.d/bandwidthd
71 0 0 * * * root /bin/kill -HUP `cat /var/run/bandwidthd.pid`
75 rm -rf $RPM_BUILD_ROOT
78 /sbin/chkconfig --add bandwidthd
79 %service bandwidthd restart
82 if [ "$1" = "0" ]; then
83 %service bandwidthd stop
84 /sbin/chkconfig --del bandwidthd
88 %defattr(644,root,root,755)
89 %doc CHANGELOG README TODO
90 %attr(755,root,root) %{_sbindir}/bandwidthd
93 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
94 %attr(754,root,root) /etc/rc.d/init.d/bandwidthd
95 %config(noreplace) %verify(not md5 mtime size) %attr(640,root,root) /etc/cron.d/bandwidthd
96 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bandwidthd