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