1 |
stephdl |
1.1 |
# $Id: smeserver-sysmon.spec,v 1.3 2012/08/16 00:42:30 unnilennium Exp $ |
2 |
|
|
# 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 |
|
|
%define release 1 |
10 |
|
|
Version: %{version} |
11 |
|
|
Release: %{release}%{?dist} |
12 |
|
|
License: Freely distributable |
13 |
|
|
Group: Service |
14 |
|
|
Source: %{name}-%{version}.tgz |
15 |
|
|
BuildRoot: /var/tmp/e-smith-buildroot |
16 |
|
|
BuildRequires: e-smith-devtools |
17 |
|
|
BuildArchitectures: noarch |
18 |
|
|
Requires: smeserver-release >= 8 |
19 |
|
|
Requires: sysstat >= 5 |
20 |
|
|
Requires: rrdtool >= 1.2 |
21 |
|
|
Requires: perl(RRDs) |
22 |
|
|
Requires: fping |
23 |
|
|
AutoReqProv: no |
24 |
|
|
|
25 |
|
|
%changelog |
26 |
|
|
* Thu Sep 24 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 6.4-1.sme |
27 |
|
|
- Initial release to contribs9 |
28 |
|
|
|
29 |
|
|
* Wed Aug 15 2012 JP Pialasse <tests@pialasse.com> 6.2-2.sme |
30 |
|
|
- patch for sysstats 7 and for 64 bit systems |
31 |
|
|
|
32 |
|
|
* Thu Aug 9 2012 Shad L. Lords <slords@mail.com> 6.2-1.sme |
33 |
|
|
- Initial version |
34 |
|
|
|
35 |
|
|
%description |
36 |
|
|
System monitor for SME Server version 7 |
37 |
|
|
|
38 |
|
|
%prep |
39 |
|
|
%setup |
40 |
|
|
|
41 |
|
|
%build |
42 |
|
|
perl createlinks |
43 |
|
|
|
44 |
|
|
%install |
45 |
|
|
rm -rf $RPM_BUILD_ROOT |
46 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
47 |
|
|
rm -f %{name}-%{version}-filelist |
48 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
49 |
|
|
echo "%doc COPYING" >> %{name}-%{version}-filelist |
50 |
|
|
|
51 |
|
|
%clean |
52 |
|
|
rm -rf $RPM_BUILD_ROOT |
53 |
|
|
|
54 |
|
|
%pre |
55 |
|
|
if [ $1 -ge 1 ]; then |
56 |
|
|
/sbin/service sysmon stop &> /dev/null || : |
57 |
|
|
fi |
58 |
|
|
|
59 |
|
|
%post |
60 |
|
|
if [ $1 -ge 2 ]; then |
61 |
|
|
mkdir -p /var/lib/rrd/backup |
62 |
|
|
/bin/mv /var/lib/rrd/*.rrd /var/lib/rrd/backup/ &> /dev/null |
63 |
|
|
# FIXME: Fix for broken postun in previous versions (remove later) |
64 |
|
|
/sbin/service sysmon restart &> /dev/null || : |
65 |
|
|
fi |
66 |
|
|
|
67 |
|
|
%preun |
68 |
|
|
if [ $1 -eq 0 ]; then |
69 |
|
|
/sbin/service sysmon stop &> /dev/null || : |
70 |
|
|
fi |
71 |
|
|
|
72 |
|
|
%postun |
73 |
|
|
if [ $1 -ge 1 ]; then |
74 |
|
|
/sbin/service sysmon restart &> /dev/null || : |
75 |
|
|
fi |
76 |
|
|
|
77 |
|
|
%files -f %{name}-%{version}-filelist |
78 |
|
|
%defattr(-,root,root) |