3 |
|
|
4 |
Name: bandwidthd |
Name: bandwidthd |
5 |
Version: 2.0.1.1 |
Version: 2.0.1.1 |
6 |
Release: 4%{?dist} |
Release: 5%{?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 |
79 |
# init script |
# init script |
80 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
81 |
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
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 |
# install apache configuration |
88 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
89 |
echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \ |
echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \ |
100 |
|
|
101 |
|
|
102 |
%post |
%post |
103 |
/sbin/chkconfig --add bandwidthd |
#%systemd_post %{name}.service |
104 |
|
|
105 |
%preun |
%preun |
106 |
if [ $1 = 0 ]; then |
%systemd_preun %{name}.service |
107 |
/sbin/service bandwidthd stop > /dev/null 2>&1 |
|
108 |
/sbin/chkconfig --del bandwidthd |
%postun |
109 |
fi |
%systemd_postun_with_restart %{name}.service |
110 |
|
|
111 |
|
|
112 |
%files |
%files |
118 |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
119 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
120 |
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} |
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} |
121 |
|
|
122 |
|
%{_unitdir}/%{name}.service |
123 |
|
|
124 |
|
|
125 |
%{_sbindir}/%{name} |
%{_sbindir}/%{name} |
126 |
%dir %{_var}/www/%{name} |
%dir %{_var}/www/%{name} |
127 |
%{_var}/www/%{name}/* |
%{_var}/www/%{name}/* |
128 |
%attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh |
%attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh |
129 |
|
|
130 |
%changelog |
%changelog |
131 |
|
* Thu Oct 22 2020 Brian Read <brianr@bjsystems.co.uk> 2.0.1.1-5.sme |
132 |
|
- Initial import into SME10 tree [SME: 11046 ] |
133 |
|
- Sort out spec file for systemd and add bandwidthd.service file |
134 |
|
|
135 |
* 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 |
136 |
- Initial Import to sme9contribs |
- Initial Import to sme9contribs |
137 |
- corrected the failed patch bandwidthd-mysql.patch |
- corrected the failed patch bandwidthd-mysql.patch |