1 |
stephdl |
1.4 |
# $Id: smeserver-sysmon.spec,v 1.3 2015/09/23 22:50: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 |
stephdl |
1.4 |
%define release 3 |
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 |
stephdl |
1.1 |
|
26 |
|
|
%changelog |
27 |
stephdl |
1.4 |
* Thu Sep 24 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 6.4-3.sme |
28 |
|
|
- Network labels have changed in rrdtools |
29 |
|
|
- Added smeserver-sysmon-6.4.change_rrd_network_label.patch |
30 |
|
|
|
31 |
stephdl |
1.3 |
* Thu Sep 24 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 6.4-2.sme |
32 |
stephdl |
1.1 |
- Initial release to contribs9 |
33 |
|
|
|
34 |
|
|
* Wed Aug 15 2012 JP Pialasse <tests@pialasse.com> 6.2-2.sme |
35 |
|
|
- patch for sysstats 7 and for 64 bit systems |
36 |
|
|
|
37 |
|
|
* Thu Aug 9 2012 Shad L. Lords <slords@mail.com> 6.2-1.sme |
38 |
|
|
- Initial version |
39 |
|
|
|
40 |
|
|
%description |
41 |
stephdl |
1.4 |
System monitor for SME Server version 9 |
42 |
stephdl |
1.1 |
|
43 |
|
|
%prep |
44 |
|
|
%setup |
45 |
stephdl |
1.4 |
%patch0 -p1 |
46 |
stephdl |
1.1 |
|
47 |
|
|
%build |
48 |
|
|
perl createlinks |
49 |
|
|
|
50 |
|
|
%install |
51 |
|
|
rm -rf $RPM_BUILD_ROOT |
52 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
53 |
|
|
rm -f %{name}-%{version}-filelist |
54 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
55 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
56 |
|
|
|
57 |
|
|
%clean |
58 |
|
|
rm -rf $RPM_BUILD_ROOT |
59 |
|
|
|
60 |
|
|
%pre |
61 |
|
|
if [ $1 -ge 1 ]; then |
62 |
|
|
/sbin/service sysmon stop &> /dev/null || : |
63 |
|
|
fi |
64 |
|
|
|
65 |
|
|
%post |
66 |
|
|
if [ $1 -ge 2 ]; then |
67 |
|
|
mkdir -p /var/lib/rrd/backup |
68 |
|
|
/bin/mv /var/lib/rrd/*.rrd /var/lib/rrd/backup/ &> /dev/null |
69 |
|
|
# FIXME: Fix for broken postun in previous versions (remove later) |
70 |
|
|
/sbin/service sysmon restart &> /dev/null || : |
71 |
|
|
fi |
72 |
|
|
|
73 |
|
|
%preun |
74 |
|
|
if [ $1 -eq 0 ]; then |
75 |
|
|
/sbin/service sysmon stop &> /dev/null || : |
76 |
|
|
fi |
77 |
|
|
|
78 |
|
|
%postun |
79 |
|
|
if [ $1 -ge 1 ]; then |
80 |
|
|
/sbin/service sysmon restart &> /dev/null || : |
81 |
|
|
fi |
82 |
|
|
|
83 |
|
|
%files -f %{name}-%{version}-filelist |
84 |
|
|
%defattr(-,root,root) |