3 |
|
|
4 |
Name: bandwidthd |
Name: bandwidthd |
5 |
Version: 2.0.1.1 |
Version: 2.0.1.1 |
6 |
Release: 4%{?dist} |
Release: 8%{?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 |
20 |
|
Patch3: bandwidthd-2.0.1.1-mariadb.patch |
21 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
22 |
BuildRequires: autoconf, gd-devel, libpng-devel |
BuildRequires: autoconf, gd-devel, libpng-devel |
23 |
%{?!_without_pgsql:BuildRequires: postgresql-devel} |
%{?!_without_pgsql:BuildRequires: postgresql-devel} |
28 |
%endif |
%endif |
29 |
BuildRequires: bison, flex |
BuildRequires: bison, flex |
30 |
BuildRequires: mysql-devel |
BuildRequires: mysql-devel |
31 |
Requires(post): /sbin/chkconfig |
|
32 |
Requires(preun):/sbin/chkconfig |
Requires(post): systemd-units |
33 |
Requires(preun):/sbin/service |
Requires(preun): systemd-units |
34 |
|
Requires(postun): systemd-units |
35 |
|
BuildRequires: systemd-units |
36 |
|
|
37 |
|
|
38 |
%description |
%description |
39 |
Bandwidthd is a UNIX daemon/Windows service for graphing the traffic |
Bandwidthd is a UNIX daemon/Windows service for graphing the traffic |
60 |
#-b .pgsql |
#-b .pgsql |
61 |
%patch2 -p1 |
%patch2 -p1 |
62 |
#-b .mysql |
#-b .mysql |
63 |
|
%patch3 -p1 |
64 |
|
|
65 |
%build |
%build |
66 |
cp -af /usr/lib/rpm/config.{sub,guess} . |
cp -af /usr/lib/rpm/config.{sub,guess} . |
72 |
--bindir=%{_bindir} \ |
--bindir=%{_bindir} \ |
73 |
--localstatedir=%{_var}/www\ |
--localstatedir=%{_var}/www\ |
74 |
--datadir=%{_var}/www |
--datadir=%{_var}/www |
75 |
make %{?_smp_mflags} |
make -j2 |
76 |
|
# # in place of make %{?_smp_mflags} as it will do -j4 on builder and one task will end before the one it needs |
77 |
|
|
78 |
|
|
79 |
%install |
%install |
82 |
# init script |
# init script |
83 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d |
84 |
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/ |
85 |
|
|
86 |
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir} |
87 |
|
install %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/ |
88 |
|
|
89 |
|
|
90 |
# install apache configuration |
# install apache configuration |
91 |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d |
92 |
echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \ |
echo "Alias /%{name} %{_var}/www/%{name}/htdocs" \ |
103 |
|
|
104 |
|
|
105 |
%post |
%post |
106 |
/sbin/chkconfig --add bandwidthd |
#%systemd_post %{name}.service |
107 |
|
|
108 |
%preun |
%preun |
109 |
if [ $1 = 0 ]; then |
%systemd_preun %{name}.service |
110 |
/sbin/service bandwidthd stop > /dev/null 2>&1 |
|
111 |
/sbin/chkconfig --del bandwidthd |
%postun |
112 |
fi |
%systemd_postun_with_restart %{name}.service |
113 |
|
|
114 |
|
|
115 |
%files |
%files |
121 |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
%config(noreplace) %{_sysconfdir}/%{name}.conf |
122 |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}.conf |
123 |
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} |
%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name} |
124 |
|
|
125 |
|
%{_unitdir}/%{name}.service |
126 |
|
|
127 |
|
|
128 |
%{_sbindir}/%{name} |
%{_sbindir}/%{name} |
129 |
%dir %{_var}/www/%{name} |
%dir %{_var}/www/%{name} |
130 |
%{_var}/www/%{name}/* |
%{_var}/www/%{name}/* |
131 |
%attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh |
%attr(755,root,root) %{_var}/www/%{name}/phphtdocs/*.sh |
132 |
|
|
133 |
%changelog |
%changelog |
134 |
|
* Sun Jun 06 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-8.sme |
135 |
|
- use ENGINE in place of TYPE for mariadb |
136 |
|
|
137 |
|
* Thu Jun 03 2021 Jean-Philippe Pialasse <tests@pialasse.com> 2.0.1.1-7.sme |
138 |
|
- build test ; make -j2 |
139 |
|
|
140 |
|
* Wed Feb 03 2021 BogusDateBot |
141 |
|
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, |
142 |
|
by assuming the date is correct and changing the weekday. |
143 |
|
Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or .... |
144 |
|
|
145 |
|
* Thu Oct 22 2020 Brian Read <brianr@bjsystems.co.uk> 2.0.1.1-5.sme |
146 |
|
- Initial import into SME10 tree [SME: 11046 ] |
147 |
|
- Sort out spec file for systemd and add bandwidthd.service file |
148 |
|
|
149 |
* 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 |
150 |
- Initial Import to sme9contribs |
- Initial Import to sme9contribs |
151 |
- corrected the failed patch bandwidthd-mysql.patch |
- corrected the failed patch bandwidthd-mysql.patch |
159 |
- added back autoconf and autoheader |
- added back autoconf and autoheader |
160 |
- cond buid for rhel4 |
- cond buid for rhel4 |
161 |
|
|
162 |
* 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 |
163 |
|
Sun Dec 13 2008 --> Sun Dec 07 2008 or Sat Dec 13 2008 or Sun Dec 14 2008 or .... |
164 |
- updated config.sub and config.guess to build on ppc64 |
- updated config.sub and config.guess to build on ppc64 |
165 |
- added libpng-devel again (required for EPEL-4) |
- added libpng-devel again (required for EPEL-4) |
166 |
|
|