1 |
jcrisp |
1.6 |
# $Id: smeserver-sysmon.spec,v 1.5 2015/09/25 18:06:36 stephdl Exp $ |
2 |
stephdl |
1.1 |
# Authority: slords |
3 |
|
|
# Name: Shad L. Lords |
4 |
|
|
|
5 |
|
|
Summary: sme server system monitor |
6 |
|
|
%define name smeserver-sysmon |
7 |
|
|
Name: %{name} |
8 |
|
|
%define version 6.4 |
9 |
jcrisp |
1.6 |
%define release 5 |
10 |
stephdl |
1.1 |
Version: %{version} |
11 |
|
|
Release: %{release}%{?dist} |
12 |
|
|
License: Freely distributable |
13 |
|
|
Group: Service |
14 |
stephdl |
1.2 |
Source: %{name}-%{version}.tar.gz |
15 |
stephdl |
1.1 |
BuildRoot: /var/tmp/e-smith-buildroot |
16 |
|
|
BuildRequires: e-smith-devtools |
17 |
|
|
BuildArchitectures: noarch |
18 |
stephdl |
1.2 |
Requires: smeserver-release >= 9 |
19 |
stephdl |
1.1 |
Requires: sysstat >= 5 |
20 |
|
|
Requires: rrdtool >= 1.2 |
21 |
|
|
Requires: perl(RRDs) |
22 |
|
|
Requires: fping |
23 |
|
|
AutoReqProv: no |
24 |
stephdl |
1.4 |
Patch0: smeserver-sysmon-6.4.change_rrd_network_label.patch |
25 |
jcrisp |
1.6 |
Patch1: smeserver-sysmon-6.4.fix_swap_information.patch |
26 |
stephdl |
1.1 |
|
27 |
|
|
%changelog |
28 |
jcrisp |
1.6 |
* Mon Jan 15 2018 John Crisp <jcrisp@safeandsoundit.co.uk> 6.4-5.sme |
29 |
|
|
- Fix missing swap information [[SME: 10493]] |
30 |
|
|
- Remove unnecessary daemonising line |
31 |
|
|
|
32 |
stephdl |
1.5 |
* Thu Sep 24 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 6.4-4.sme |
33 |
stephdl |
1.4 |
- Network labels have changed in rrdtools |
34 |
|
|
- Added smeserver-sysmon-6.4.change_rrd_network_label.patch |
35 |
|
|
|
36 |
stephdl |
1.3 |
* Thu Sep 24 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 6.4-2.sme |
37 |
stephdl |
1.1 |
- Initial release to contribs9 |
38 |
|
|
|
39 |
|
|
* Wed Aug 15 2012 JP Pialasse <tests@pialasse.com> 6.2-2.sme |
40 |
|
|
- patch for sysstats 7 and for 64 bit systems |
41 |
|
|
|
42 |
|
|
* Thu Aug 9 2012 Shad L. Lords <slords@mail.com> 6.2-1.sme |
43 |
|
|
- Initial version |
44 |
|
|
|
45 |
|
|
%description |
46 |
stephdl |
1.4 |
System monitor for SME Server version 9 |
47 |
stephdl |
1.1 |
|
48 |
|
|
%prep |
49 |
|
|
%setup |
50 |
stephdl |
1.4 |
%patch0 -p1 |
51 |
jcrisp |
1.6 |
%patch1 -p1 |
52 |
stephdl |
1.1 |
|
53 |
|
|
%build |
54 |
|
|
perl createlinks |
55 |
|
|
|
56 |
|
|
%install |
57 |
|
|
rm -rf $RPM_BUILD_ROOT |
58 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
59 |
|
|
rm -f %{name}-%{version}-filelist |
60 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
61 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
62 |
|
|
|
63 |
|
|
%clean |
64 |
|
|
rm -rf $RPM_BUILD_ROOT |
65 |
|
|
|
66 |
|
|
%pre |
67 |
|
|
if [ $1 -ge 1 ]; then |
68 |
|
|
/sbin/service sysmon stop &> /dev/null || : |
69 |
|
|
fi |
70 |
|
|
|
71 |
|
|
%post |
72 |
|
|
if [ $1 -ge 2 ]; then |
73 |
|
|
mkdir -p /var/lib/rrd/backup |
74 |
|
|
/bin/mv /var/lib/rrd/*.rrd /var/lib/rrd/backup/ &> /dev/null |
75 |
|
|
# FIXME: Fix for broken postun in previous versions (remove later) |
76 |
|
|
/sbin/service sysmon restart &> /dev/null || : |
77 |
|
|
fi |
78 |
|
|
|
79 |
|
|
%preun |
80 |
|
|
if [ $1 -eq 0 ]; then |
81 |
|
|
/sbin/service sysmon stop &> /dev/null || : |
82 |
|
|
fi |
83 |
|
|
|
84 |
|
|
%postun |
85 |
|
|
if [ $1 -ge 1 ]; then |
86 |
|
|
/sbin/service sysmon restart &> /dev/null || : |
87 |
|
|
fi |
88 |
|
|
|
89 |
|
|
%files -f %{name}-%{version}-filelist |
90 |
|
|
%defattr(-,root,root) |