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

Diff of /rpms/bandwidthd/contribs10/bandwidthd.spec

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

Revision 1.1 by brianr, Wed Oct 21 11:20:49 2020 UTC Revision 1.2 by brianr, Fri Nov 20 10:34:50 2020 UTC
# Line 3  Line 3 
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
# Line 24  BuildRequires:  libpcap-devel Line 27  BuildRequires:  libpcap-devel
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
# Line 73  make install DESTDIR=$RPM_BUILD_ROOT Line 79  make install DESTDIR=$RPM_BUILD_ROOT
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" \
# Line 89  rm -rf $RPM_BUILD_ROOT Line 100  rm -rf $RPM_BUILD_ROOT
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
# Line 107  fi Line 118  fi
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


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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