]> git.pld-linux.org Git - packages/monit.git/blob - monit.spec
- main config moved to /etc/monitrc
[packages/monit.git] / monit.spec
1 Summary:        Process monitor and restart utility
2 Summary(pl):    Narzêdzie do monitorowania procesów i ich restartowania
3 Name:           monit
4 Version:        4.8.2
5 Release:        1.1
6 License:        GPL
7 Group:          Applications/Console
8 Source0:        http://www.tildeslash.com/monit/dist/%{name}-%{version}.tar.gz
9 # Source0-md5:  e7ad6056c71becf014653f6597d110ca
10 Source1:        %{name}.init
11 Patch0:         %{name}-localhost-http.patch
12 Patch1:         monit-config.patch
13 URL:            http://www.tildeslash.com/monit/
14 BuildRequires:  bison
15 BuildRequires:  flex
16 BuildRequires:  openssl-devel >= 0.9.7d
17 BuildRequires:  rpmbuild(macros) >= 1.268
18 Requires(post,preun):   /sbin/chkconfig
19 Requires:       rc-scripts
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 monit is an utility for monitoring daemons or similar programs running
24 on a Unix system. It will start specified programs if they are not
25 running and restart programs not responding.
26
27 %description -l pl
28 monit jest narzêdziem do monitorowania demonów oraz podobnych
29 programów pracuj±cych w systemie Unix. monit zrestartuje podany
30 program w momencie gdy przestaje on pracowaæ lub w momencie gdy
31 program przestaje odpowiadaæ.
32
33 %prep
34 %setup -q
35 %patch0 -p1
36 %patch1 -p1
37
38 %build
39 %configure \
40         --with-ssl-lib-dir=%{_libdir}
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,monit},%{_sbindir}}
46
47 %{__make} install \
48         DESTDIR=$RPM_BUILD_ROOT
49
50 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
51 install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
52 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/monit
53
54 %clean
55 rm -rf $RPM_BUILD_ROOT
56
57 %post
58 /sbin/chkconfig --add %{name}
59 %service monit restart "Monit Daemon"
60
61 %preun
62 if [ "$1" = "0" ]; then
63         %service monit stop
64         /sbin/chkconfig --del %{name}
65 fi
66
67 %triggerpostun -- %{name} < 4.8.2-1.1
68 if [ -f %{_sysconfdir}/monit/default.monitrc.rpmsave ]; then
69         cp -f %{_sysconfdir}/monitrc{,.rpmnew}
70         mv -f %{_sysconfdir}/monit{/default.monitrc.rpmsave,rc}
71         echo 'include /etc/monit/*.monitrc' >> %{_sysconfdir}/monitrc
72         %service -q monit restart
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc doc/*.html CHANGES.txt CONTRIBUTORS FAQ.txt README*
78 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc
79 %dir %attr(751,root,root) %{_sysconfdir}/monit
80 %attr(755,root,root) %{_sbindir}/monit
81 %attr(754,root,root) /etc/rc.d/init.d/%{name}
82 %{_mandir}/man?/*
This page took 0.064706 seconds and 4 git commands to generate.