/[smecontribs]/rpms/bandwidthd/contribs8/bandwidthd.spec
ViewVC logotype

Contents of /rpms/bandwidthd/contribs8/bandwidthd.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Wed Sep 23 20:56:40 2015 UTC (9 years, 1 month ago) by stephdl
Branch: MAIN
CVS Tags: bandwidthd-2_0_1_1-3_el5_sme, HEAD
Changes since 1.2: +4 -1 lines
* Wed Sep 23 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 2.0.1.1-3
- corrected the failed patch bandwidthd-mysql.patch

1 # You can compile this without postgresql support by running:
2 # rpmbuild -ba bandwidthd.spec --without pgsql
3
4 Name: bandwidthd
5 Version: 2.0.1.1
6 Release: 3%{?dist}
7 Summary: Tracks network usage and builds html and graphs
8
9 Group: System Environment/Daemons
10 License: GPL+
11 URL: http://bandwidthd.sourceforge.net/
12 Source0: bandwidthd-2.0.1.1.tgz
13 Source1: %{name}
14 Patch0: bandwidthd-destdir.patch
15 Patch1: bandwidthd-pgsql.patch
16 Patch2: bandwidthd-mysql.patch
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 BuildRequires: autoconf, gd-devel, libpng-devel
19 %{?!_without_pgsql:BuildRequires: postgresql-devel}
20 %if "0%{?dist}" == "0.el4" || "0%{?dist}" == "0.RHL4"
21 BuildRequires: libpcap
22 %else
23 BuildRequires: libpcap-devel
24 %endif
25 BuildRequires: bison, flex
26 BuildRequires: mysql-devel
27 Requires(post): /sbin/chkconfig
28 Requires(preun):/sbin/chkconfig
29 Requires(preun):/sbin/service
30
31 %description
32 Bandwidthd is a UNIX daemon/Windows service for graphing the traffic
33 generated by each machine on several configurable subnets. It is much
34 easier to configure than MRTG, and provides significantly more useful
35 information. MRTG only tells you how much bandwidth you are using,
36 Bandwidthd tells you that, and who is using it.
37
38 Each IP address that has moved any significant volume of traffic has its
39 own graph. The graphs are color coded to help you figure out at a glance
40 if your user is surfing the web, or surfing Kazaa.
41
42 Bandwidthd is targeted to run on my routing platforms. It is very low
43 overhead. Easily graphing small business traffic on a 133Mhz Elan 486
44 every 2.5 minutes. My entire ISP (2000-3000 IP addresses across 4 states)
45 is graphed on a Celeron 450 every 10 minutes.
46
47
48 %prep
49 %setup -q
50 %patch0 -p1
51 #-b .dest
52 %patch1 -p0
53 #-b .pgsql
54 %patch2 -p1
55 #-b .mysql
56
57 %build
58 cp -af /usr/lib/rpm/config.{sub,guess} .
59 autoheader
60 autoconf
61 %configure --prefix=%{_prefix} \
62 --exec_prefix=%{_prefix} \
63 --sysconfdir=%{_sysconfdir} \
64 --bindir=%{_bindir} \
65 --localstatedir=%{_var}/www\
66 --datadir=%{_var}/www
67 make %{?_smp_mflags}
68
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 make install DESTDIR=$RPM_BUILD_ROOT
73 # init script
74 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
75 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
76 # install apache configuration
77 install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
78 echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \
79 > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
80 # remove execute bit for gif and sh script without #!
81 chmod -x phphtdocs/*.gif
82
83 # prepare for mysql
84 #cp phphtdocs/*.php phphtdocs/*.conf phphtdocs/*.sh $RPM_BUILD_ROOT/var/www/%{name}/htdocs/
85 cp -a phphtdocs $RPM_BUILD_ROOT/var/www/%{name}/
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90
91 %post
92 /sbin/chkconfig --add bandwidthd
93
94 %preun
95 if [ $1 = 0 ]; then
96 /sbin/service bandwidthd stop > /dev/null 2>&1
97 /sbin/chkconfig --del bandwidthd
98 fi
99
100
101 %files
102 %defattr(-,root,root,-)
103 %doc README CHANGELOG TODO
104 %{?!_without_pgsql:%doc phphtdocs}
105 %attr(755,admin,www) %{_var}/www/%{name}/phphtdocs/*.php
106 %attr(755,admin,www) %{_var}/www/%{name}/phphtdocs/*.conf
107 %config(noreplace) %{_sysconfdir}/%{name}.conf
108 %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
109 %attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
110 %{_sbindir}/%{name}
111 %dir %{_var}/www/%{name}
112 %{_var}/www/%{name}/*
113 %attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh
114
115 %changelog
116 * Wed Sep 23 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 2.0.1.1-3
117 - corrected the failed patch bandwidthd-mysql.patch
118
119 * Sun Dec 29 2013 JP Pialasse <tests@pialasse.com> - 2.0.1.1-2
120 - adapted for SME8
121 - initial import
122
123 * Sat Mar 12 2011 JP Pialasse <tests@pialasse.com> - 2.0.1.1-1
124 - updated to CVS on 2005 sep 26 with mysql support patch
125 - added back autoconf and autoheader
126 - cond buid for rhel4
127
128 * Sun Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-11
129 - updated config.sub and config.guess to build on ppc64
130 - added libpng-devel again (required for EPEL-4)
131
132 * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-8
133 - removed dependency on gd
134 - removed one line of autoconf
135 - removed dependency on libpng-devel
136 - phphtdocs added for pgsql build, execute bit for gif and sh removed
137
138 * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-7
139 - changed License to GPL+
140
141 * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-6
142 - buildroot macro replaced by RPM_BUILD_ROOT variable
143 - added autoconf into build-requires
144 - by default compiled with postgresql support
145 - conditional build without postgresql (--without pgsql)
146 - libpng removed from requires
147
148 * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-5
149 - conditional build for el4
150
151 * Sun Sep 9 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-4
152 - updated license and summary
153 - changed init script permissions
154
155 * Tue Mar 13 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
156 - updated from version by Michal Ambroz <rebus@seznam.cz>
157 - added apache configuration script
158 - moved into /var/www/bandwidthd
159 - spec file name typo fixed

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed