1 |
# $Id: smeserver-sme8admin.spec,v 1.2 2012/08/16 00:39:06 unnilennium Exp $ |
2 |
# Authority: vip-ire |
3 |
# Name: Daniel Berteaud |
4 |
# |
5 |
|
6 |
Summary: A graphical monitor, alert raising, and services supervision tool for your SME Server. |
7 |
%define name smeserver-sme8admin |
8 |
Name: %{name} |
9 |
%define version 1.3 |
10 |
%define release 3 |
11 |
Version: %{version} |
12 |
Release: %{release}%{?dist} |
13 |
License: GPL |
14 |
Group: Networking/Daemons |
15 |
Source: %{name}-%{version}.tgz |
16 |
Patch0: smeserver-sme8admin-64bit.patch |
17 |
Patch1: smeserver-sme8admin-1.3-startup.patch |
18 |
|
19 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
20 |
BuildArchitectures: noarch |
21 |
|
22 |
BuildRequires: e-smith-devtools |
23 |
BuildRequires: gettext |
24 |
|
25 |
Requires: e-smith-base |
26 |
Requires: smeserver-release >= 8 |
27 |
Requires: rrdtool-perl |
28 |
Requires: rrdtool |
29 |
Requires: hddtemp |
30 |
Requires: sysstat |
31 |
Requires: lm_sensors |
32 |
|
33 |
AutoReqProv: no |
34 |
|
35 |
%changelog |
36 |
* Sun Sep 09 2012 JP Pialasse <test@pialasse.com> 1.3-3.sme |
37 |
- startup fix [SME 3022] |
38 |
|
39 |
* Wed Aug 15 2012 JP Pialasse <test@pialasse.com> 1.3-2.sme |
40 |
- 64 bits [SME 7040] |
41 |
|
42 |
* Sun Jun 10 2012 JP Pialasse <test@pialasse.com> 1.3-1.sme |
43 |
- Initial version |
44 |
|
45 |
%description |
46 |
The main part of sme8admin is a daemon which gathers informations from logs |
47 |
and other tools like systat, it then feed a mysql database and create RRD |
48 |
graphs about your system state. |
49 |
This daemon can also send periodics mails (with some logs), and alerts mails |
50 |
based on configurable thresolds. |
51 |
|
52 |
A panel is also available in the server-manager, with which you can access gathered |
53 |
data, display the RRD graphs and configure the service. |
54 |
|
55 |
This contrib is a bit inspired by e-smith-sysmon from Shad Lords. |
56 |
|
57 |
%prep |
58 |
%setup |
59 |
%patch0 -p1 |
60 |
%patch1 -p1 |
61 |
|
62 |
|
63 |
%build |
64 |
perl createlinks |
65 |
%{__mkdir_p} root/etc/e-smith/web/panels/manager/html/sme8admin |
66 |
%{__mkdir_p} root/usr/share/locale/en_US/LC_MESSAGES |
67 |
|
68 |
xgettext --from-code UTF-8 -F --no-wrap -L perl \ |
69 |
-o root/usr/share/locale/en_US/LC_MESSAGES/sme8admin.po \ |
70 |
root/etc/e-smith/web/functions/sme8admin \ |
71 |
root/usr/bin/sme8admind |
72 |
|
73 |
/sbin/e-smith/generate-lexicons |
74 |
|
75 |
%install |
76 |
rm -rf $RPM_BUILD_ROOT |
77 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
78 |
rm -f %{name}-%{version}-filelist |
79 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist |
80 |
|
81 |
%clean |
82 |
rm -rf $RPM_BUILD_ROOT |
83 |
|
84 |
%pre |
85 |
# This is to correct a bug in the previous version |
86 |
if [ -e /etc/e-smith/web/panels/manager/html/sme7admin/sme7admin.conf ]; then |
87 |
cp -a /etc/e-smith/web/panels/manager/html/sme7admin/sme7admin.conf \ |
88 |
/etc/e-smith/web/panels/manager/html/sme7admin/_sme7admin.conf |
89 |
fi |
90 |
|
91 |
%preun |
92 |
|
93 |
|
94 |
%post |
95 |
|
96 |
if [ $1 -eq 1 ] |
97 |
then |
98 |
|
99 |
if [ -d /var/lib/sme7admin ] && [ -d /var/lib/mysql/sme7admin/ ] |
100 |
then |
101 |
echo "After post-upgrade and reboot, you may safely remove sme7admin, as datas will be migrated to sme8admin." |
102 |
echo "Execute 'rpm -e smeserver-sme7admin' and maybe 'mysqladmin drop sme7admin' and 'rm -Rf /var/lib/sme7admin' to completely remove sme7admin." |
103 |
fi |
104 |
|
105 |
fi |
106 |
|
107 |
%postun |
108 |
|
109 |
%files -f %{name}-%{version}-filelist |
110 |
%defattr(-,root,root) |
111 |
%attr(755,root,root) /etc/e-smith/sql/init/sme8admin |