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

Contents of /rpms/bandwidthd/contribs10/bandwidthd.spec

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


Revision 1.3 - (show annotations) (download)
Wed Feb 3 11:56:07 2021 UTC (3 years, 3 months ago) by brianr
Branch: MAIN
Changes since 1.2: +7 -1 lines
* Wed Feb 03 2021 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
  by assuming the date is correct and changing the weekday.
  Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or ....

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

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