/[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.5 - (hide annotations) (download)
Thu Jun 3 15:49:10 2021 UTC (3 years, 5 months ago) by jpp
Branch: MAIN
CVS Tags: bandwidthd-2_0_1_1-7_el7_sme
Changes since 1.4: +5 -4 lines
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-7.sme
- build test ; make -j2

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.5 Release: 7%{?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 jpp 1.5 make -j2
74     # # in place of make %{?_smp_mflags} as it will do -j4 on builder and one task will end before the one it needs
75 brianr 1.1
76    
77     %install
78     rm -rf $RPM_BUILD_ROOT
79     make install DESTDIR=$RPM_BUILD_ROOT
80     # init script
81     install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
82     install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
83 brianr 1.2
84     mkdir -p $RPM_BUILD_ROOT%{_unitdir}
85     install %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/
86    
87    
88 brianr 1.1 # install apache configuration
89     install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d
90     echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \
91     > $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{name}.conf
92     # remove execute bit for gif and sh script without #!
93     chmod -x phphtdocs/*.gif
94    
95     # prepare for mysql
96     #cp phphtdocs/*.php phphtdocs/*.conf phphtdocs/*.sh $RPM_BUILD_ROOT/var/www/%{name}/htdocs/
97     cp -a phphtdocs $RPM_BUILD_ROOT/var/www/%{name}/
98    
99     %clean
100     rm -rf $RPM_BUILD_ROOT
101    
102    
103     %post
104 brianr 1.2 #%systemd_post %{name}.service
105 brianr 1.1
106     %preun
107 brianr 1.2 %systemd_preun %{name}.service
108    
109     %postun
110     %systemd_postun_with_restart %{name}.service
111 brianr 1.1
112    
113     %files
114     %defattr(-,root,root,-)
115     %doc README CHANGELOG TODO
116     %{?!_without_pgsql:%doc phphtdocs}
117     %attr(755,admin,www) %{_var}/www/%{name}/phphtdocs/*.php
118     %attr(755,admin,www) %{_var}/www/%{name}/phphtdocs/*.conf
119     %config(noreplace) %{_sysconfdir}/%{name}.conf
120     %config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf
121     %attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
122 brianr 1.2
123     %{_unitdir}/%{name}.service
124    
125    
126 brianr 1.1 %{_sbindir}/%{name}
127     %dir %{_var}/www/%{name}
128     %{_var}/www/%{name}/*
129     %attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh
130    
131     %changelog
132 jpp 1.5 * Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-7.sme
133     - build test ; make -j2
134 jpp 1.4
135 brianr 1.3 * Wed Feb 03 2021 BogusDateBot
136     - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
137     by assuming the date is correct and changing the weekday.
138     Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or ....
139    
140 brianr 1.2 * Thu Oct 22 2020 Brian Read <brianr@bjsystems.co.uk> 2.0.1.1-5.sme
141     - Initial import into SME10 tree [SME: 11046 ]
142     - Sort out spec file for systemd and add bandwidthd.service file
143    
144 brianr 1.1 * Sat Sep 19 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 2.0.1.1-4
145     - Initial Import to sme9contribs
146     - corrected the failed patch bandwidthd-mysql.patch
147    
148     * Sun Dec 29 2013 JP Pialasse <tests@pialasse.com> - 2.0.1.1-2
149     - adapted for SME8
150     - initial import
151    
152     * Sat Mar 12 2011 JP Pialasse <tests@pialasse.com> - 2.0.1.1-1
153     - updated to CVS on 2005 sep 26 with mysql support patch
154     - added back autoconf and autoheader
155     - cond buid for rhel4
156    
157 brianr 1.3 * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-11
158     Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or ....
159 brianr 1.1 - updated config.sub and config.guess to build on ppc64
160     - added libpng-devel again (required for EPEL-4)
161    
162     * Sat Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-8
163     - removed dependency on gd
164     - removed one line of autoconf
165     - removed dependency on libpng-devel
166     - phphtdocs added for pgsql build, execute bit for gif and sh removed
167    
168     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-7
169     - changed License to GPL+
170    
171     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-6
172     - buildroot macro replaced by RPM_BUILD_ROOT variable
173     - added autoconf into build-requires
174     - by default compiled with postgresql support
175     - conditional build without postgresql (--without pgsql)
176     - libpng removed from requires
177    
178     * Mon Dec 8 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-5
179     - conditional build for el4
180    
181     * Sun Sep 9 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-4
182     - updated license and summary
183     - changed init script permissions
184    
185     * Tue Mar 13 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
186     - updated from version by Michal Ambroz <rebus@seznam.cz>
187     - added apache configuration script
188     - moved into /var/www/bandwidthd
189     - spec file name typo fixed

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