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

Annotation of /rpms/bandwidthd/contribs10/bandwidthd.spec

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


Revision 1.4 - (hide annotations) (download)
Thu Jun 3 15:16:53 2021 UTC (3 years, 4 months ago) by jpp
Branch: MAIN
CVS Tags: bandwidthd-2_0_1_1-6_el7_sme
Changes since 1.3: +4 -1 lines
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-6.sme
- build test

1 brianr 1.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 jpp 1.4 Release: 6%{?dist}
7 brianr 1.1 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 brianr 1.2
14 brianr 1.1 Source1: %{name}
15 brianr 1.2 Source2: %{name}.service
16    
17 brianr 1.1 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 brianr 1.2
31     Requires(post): systemd-units
32     Requires(preun): systemd-units
33     Requires(postun): systemd-units
34     BuildRequires: systemd-units
35    
36 brianr 1.1
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 brianr 1.2
83     mkdir -p $RPM_BUILD_ROOT%{_unitdir}
84     install %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/
85    
86    
87 brianr 1.1 # 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 brianr 1.2 #%systemd_post %{name}.service
104 brianr 1.1
105     %preun
106 brianr 1.2 %systemd_preun %{name}.service
107    
108     %postun
109     %systemd_postun_with_restart %{name}.service
110 brianr 1.1
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 brianr 1.2
122     %{_unitdir}/%{name}.service
123    
124    
125 brianr 1.1 %{_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 jpp 1.4 * Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-6.sme
132     - build test
133    
134 brianr 1.3 * Wed Feb 03 2021 BogusDateBot
135     - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
136     by assuming the date is correct and changing the weekday.
137     Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or ....
138    
139 brianr 1.2 * Thu Oct 22 2020 Brian Read <brianr@bjsystems.co.uk> 2.0.1.1-5.sme
140     - Initial import into SME10 tree [SME: 11046 ]
141     - Sort out spec file for systemd and add bandwidthd.service file
142    
143 brianr 1.1 * Sat Sep 19 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 2.0.1.1-4
144     - Initial Import to sme9contribs
145     - corrected the failed patch bandwidthd-mysql.patch
146    
147     * Sun Dec 29 2013 JP Pialasse <tests@pialasse.com> - 2.0.1.1-2
148     - adapted for SME8
149     - initial import
150    
151     * Sat Mar 12 2011 JP Pialasse <tests@pialasse.com> - 2.0.1.1-1
152     - updated to CVS on 2005 sep 26 with mysql support patch
153     - added back autoconf and autoheader
154     - cond buid for rhel4
155    
156 brianr 1.3 * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-11
157     Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or ....
158 brianr 1.1 - updated config.sub and config.guess to build on ppc64
159     - added libpng-devel again (required for EPEL-4)
160    
161     * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-8
162     - removed dependency on gd
163     - removed one line of autoconf
164     - removed dependency on libpng-devel
165     - phphtdocs added for pgsql build, execute bit for gif and sh removed
166    
167     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-7
168     - changed License to GPL+
169    
170     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-6
171     - buildroot macro replaced by RPM_BUILD_ROOT variable
172     - added autoconf into build-requires
173     - by default compiled with postgresql support
174     - conditional build without postgresql (--without pgsql)
175     - libpng removed from requires
176    
177     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-5
178     - conditional build for el4
179    
180     * Sun Sep 9 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-4
181     - updated license and summary
182     - changed init script permissions
183    
184     * Tue Mar 13 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
185     - updated from version by Michal Ambroz <rebus@seznam.cz>
186     - added apache configuration script
187     - moved into /var/www/bandwidthd
188     - spec file name typo fixed

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