]> git.pld-linux.org Git - packages/monit.git/blob - monit.spec
- up to 5.0.1
[packages/monit.git] / monit.spec
1 #
2 Summary:        Process monitor and restart utility
3 Summary(pl.UTF-8):      Narzędzie do monitorowania procesów i ich restartowania
4 Name:           monit
5 Version:        5.0.1
6 Release:        1
7 License:        GPL
8 Group:          Applications/Console
9 Source0:        http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
10 # Source0-md5:  4a33f7f0b8d40264fb50370e6544f974
11 Source1:        %{name}.init
12 Source2:        %{name}rc
13 URL:            http://mmonit.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 >= 0.4.0.15
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.UTF-8
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
36 %build
37 %configure \
38         --with-ssl-lib-dir=%{_libdir}
39 %{__make}
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,monit},%{_sbindir}}
44
45 %{__make} install \
46         DESTDIR=$RPM_BUILD_ROOT
47
48 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
49 # NOTE: 'include *.monitrc' will fail if nothing matches the glob.
50 install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
51 install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.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 %files
68 %defattr(644,root,root,755)
69 %doc doc/*.html CHANGES.txt CONTRIBUTORS FAQ.txt README*
70 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc
71 %dir %attr(751,root,root) %{_sysconfdir}/monit
72 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
73 %attr(755,root,root) %{_sbindir}/monit
74 %attr(754,root,root) /etc/rc.d/init.d/%{name}
75 %{_mandir}/man?/*
This page took 0.073401 seconds and 4 git commands to generate.