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