]> git.pld-linux.org Git - packages/bandwidthd.git/blame - bandwidthd.spec
- tabs in preamble
[packages/bandwidthd.git] / bandwidthd.spec
CommitLineData
debc9291 1Summary: Network traffic tracking tool
8fbbc890 2Summary(pl.UTF-8): Narzędzie do śledzenia ruchu sieciowego
debc9291 3Name: bandwidthd
4Version: 2.0.1
5Release: 0.1
6License: GPL
7Group: Networking/Admin
8Source0: http://dl.sourceforge.net/bandwidthd/%{name}-%{version}.tgz
9# Source0-md5: aa79aad7bd489fd2cae1f7dc086ca8b6
10Source1: %{name}.init
11Source2: %{name}.sysconfig
12Source3: %{name}.conf
13Patch0: %{name}-makefile.patch
14Patch1: %{name}-pgsql.patch
15Patch2: %{name}-path.patch
16URL: http://bandwidthd.sourceforge.net/
1217261b 17BuildRequires: autoconf
debc9291 18BuildRequires: gd-devel
19BuildRequires: libpcap-devel
1217261b 20BuildRequires: libpng-devel
28ee44d0 21BuildRequires: rpmbuild(macros) >= 1.268
debc9291 22Requires(post,preun): /sbin/chkconfig
28ee44d0 23Requires: rc-scripts
1217261b 24Requires: webserver
debc9291 25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
b7250f2b 27%define _htmldir /home/services/httpd/html/bandwidthd
debc9291 28
29%description
30BandwidthD tracks usage of TCP/IP network subnets and builds html
31files with graphs to display utilization. Charts are built by
32individual IPs, and by default display utilization over 2 day, 8 day,
3340 day, and 400 day periods. Furthermore, each ip address's
34utilization can be logged out at intervals of 3.3 minutes, 10 minutes,
351 hour or 12 hours in cdf format, or to a backend database server.
36HTTP, TCP, UDP, ICMP, VPN, and P2P traffic are color coded.
37
7db07c6c
JR
38%description -l pl.UTF-8
39BandwidthD śledzi użycie sieci TCP/IP i buduje pliki HTML
40wyświetlające ruch sieciowy. Wykresy pokazują IP użytkowników i
41domyślnie wyświetlają zużycie na przestrzeni 2, 8, 40 i 400 dni.
42Ponadto udział każdego adresu IP w ruchu sieciowym może być zapisywany
43w przedziałach 3.3 minut, 10 minut, 1 godziny lub 12 godzin w formacie
debc9291 44cdf, albo zapisywany do bazy danych. Ruch HTTP, TCP, UDP, ICMP, VPN, i
7db07c6c 45P2P jest kodowany w różnych kolorach.
debc9291 46
47%prep
48%setup -q
49%patch0 -p0
50%patch1 -p0
51%patch2 -p1
52
53%build
54%{__autoconf}
55%{__autoheader}
56%configure
57
58%{__make}
59
60%install
61rm -rf $RPM_BUILD_ROOT
62install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_htmldir},/etc/{sysconfig,rc.d/init.d,cron.d}}
63
64install bandwidthd $RPM_BUILD_ROOT%{_sbindir}
65install htdocs/* $RPM_BUILD_ROOT%{_htmldir}
66install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bandwidthd
67install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bandwidthd
68install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
69
28ee44d0
ER
70cat << 'EOF' > $RPM_BUILD_ROOT/etc/cron.d/bandwidthd
710 0 * * * root /bin/kill -HUP `cat /var/run/bandwidthd.pid`
debc9291 72EOF
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%post
78/sbin/chkconfig --add bandwidthd
28ee44d0 79%service bandwidthd restart
debc9291 80
81%preun
82if [ "$1" = "0" ]; then
28ee44d0 83 %service bandwidthd stop
b7250f2b 84 /sbin/chkconfig --del bandwidthd
debc9291 85fi
86
87%files
88%defattr(644,root,root,755)
89%doc CHANGELOG README TODO
90%attr(755,root,root) %{_sbindir}/bandwidthd
91%dir %{_htmldir}
92%{_htmldir}/*
34436d66
JB
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
This page took 0.081662 seconds and 4 git commands to generate.