3 |
|
|
4 |
Name: bandwidthd |
Name: bandwidthd |
5 |
Version: 2.0.1.1 |
Version: 2.0.1.1 |
6 |
Release: 4%{?dist} |
Release: 7%{?dist} |
7 |
Summary: Tracks network usage and builds html and graphs |
Summary: Tracks network usage and builds html and graphs |
8 |
|
|
9 |
Group: System Environment/Daemons |
Group: System Environment/Daemons |
10 |
License: GPL+ |
License: GPL+ |
11 |
URL: http://bandwidthd.sourceforge.net/ |
URL: http://bandwidthd.sourceforge.net/ |
12 |
Source0: bandwidthd-2.0.1.1.tgz |
Source0: bandwidthd-2.0.1.1.tgz |
13 |
|
|
14 |
Source1: %{name} |
Source1: %{name} |
15 |
|
Source2: %{name}.service |
16 |
|
|
17 |
Patch0: bandwidthd-destdir.patch |
Patch0: bandwidthd-destdir.patch |
18 |
Patch1: bandwidthd-pgsql.patch |
Patch1: bandwidthd-pgsql.patch |
19 |
Patch2: bandwidthd-mysql.patch |
Patch2: bandwidthd-mysql.patch |
27 |
%endif |
%endif |
28 |
BuildRequires: bison, flex |
BuildRequires: bison, flex |
29 |
BuildRequires: mysql-devel |
BuildRequires: mysql-devel |
30 |
Requires(post): /sbin/chkconfig |
|
31 |
Requires(preun):/sbin/chkconfig |
Requires(post): systemd-units |
32 |
Requires(preun):/sbin/service |
Requires(preun): systemd-units |
33 |
|
Requires(postun): systemd-units |
34 |
|
BuildRequires: systemd-units |
35 |
|
|
36 |
|
|
37 |
%description |
%description |
38 |
Bandwidthd is a UNIX daemon/Windows service for graphing the traffic |
Bandwidthd is a UNIX daemon/Windows service for graphing the traffic |
70 |
--bindir=%{_bindir} \ |
--bindir=%{_bindir} \ |
71 |
--localstatedir=%{_var}/www\ |
--localstatedir=%{_var}/www\ |
72 |
--datadir=%{_var}/www |
--datadir=%{_var}/www |
73 |
make %{?_smp_mflags} |
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 |
|
|
76 |
|
|
77 |
%install |
%install |
80 |
# init script |
# init script |
81 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
82 |
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
83 |
|
|
84 |
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir} |
85 |
|
install %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/ |
86 |
|
|
87 |
|
|
88 |
# install apache configuration |
# install apache configuration |
89 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
90 |
echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \ |
echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \ |
101 |
|
|
102 |
|
|
103 |
%post |
%post |
104 |
/sbin/chkconfig --add bandwidthd |
#%systemd_post %{name}.service |
105 |
|
|
106 |
%preun |
%preun |
107 |
if [ $1 = 0 ]; then |
%systemd_preun %{name}.service |
108 |
/sbin/service bandwidthd stop > /dev/null 2>&1 |
|
109 |
/sbin/chkconfig --del bandwidthd |
%postun |
110 |
fi |
%systemd_postun_with_restart %{name}.service |
111 |
|
|
112 |
|
|
113 |
%files |
%files |
119 |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
120 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
121 |
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} |
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} |
122 |
|
|
123 |
|
%{_unitdir}/%{name}.service |
124 |
|
|
125 |
|
|
126 |
%{_sbindir}/%{name} |
%{_sbindir}/%{name} |
127 |
%dir %{_var}/www/%{name} |
%dir %{_var}/www/%{name} |
128 |
%{_var}/www/%{name}/* |
%{_var}/www/%{name}/* |
129 |
%attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh |
%attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh |
130 |
|
|
131 |
%changelog |
%changelog |
132 |
|
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-7.sme |
133 |
|
- build test ; make -j2 |
134 |
|
|
135 |
|
* 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 |
|
* 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 |
* Sat Sep 19 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 2.0.1.1-4 |
* Sat Sep 19 2015 stephane de Labrusse <stephdl@de-labrusse.fr> - 2.0.1.1-4 |
145 |
- Initial Import to sme9contribs |
- Initial Import to sme9contribs |
146 |
- corrected the failed patch bandwidthd-mysql.patch |
- corrected the failed patch bandwidthd-mysql.patch |
154 |
- added back autoconf and autoheader |
- added back autoconf and autoheader |
155 |
- cond buid for rhel4 |
- cond buid for rhel4 |
156 |
|
|
157 |
* Sun Dec 13 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 2.0.1-11 |
* 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 |
- updated config.sub and config.guess to build on ppc64 |
- updated config.sub and config.guess to build on ppc64 |
160 |
- added libpng-devel again (required for EPEL-4) |
- added libpng-devel again (required for EPEL-4) |
161 |
|
|