]>
Commit | Line | Data |
---|---|---|
fdb71f6a | 1 | Summary: Process monitor and restart utility |
b8a62915 | 2 | Summary(pl.UTF-8): Narzędzie do monitorowania procesów i ich restartowania |
14b3c34c | 3 | Name: monit |
03278c9b | 4 | Version: 4.8.2 |
6f726317 | 5 | Release: 1.2 |
fdb71f6a | 6 | License: GPL |
5c562b12 | 7 | Group: Applications/Console |
03278c9b ER |
8 | Source0: http://www.tildeslash.com/monit/dist/%{name}-%{version}.tar.gz |
9 | # Source0-md5: e7ad6056c71becf014653f6597d110ca | |
14b3c34c | 10 | Source1: %{name}.init |
6f726317 | 11 | Source2: %{name}rc |
03278c9b | 12 | Patch0: %{name}-localhost-http.patch |
fdb71f6a | 13 | URL: http://www.tildeslash.com/monit/ |
fdb71f6a AM |
14 | BuildRequires: bison |
15 | BuildRequires: flex | |
44d81330 | 16 | BuildRequires: openssl-devel >= 0.9.7d |
3d130d51 | 17 | BuildRequires: rpmbuild(macros) >= 1.268 |
14b3c34c | 18 | Requires(post,preun): /sbin/chkconfig |
976db287 | 19 | Requires: rc-scripts >= 0.4.0.15 |
fdb71f6a AM |
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 | ||
b8a62915 JR |
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ć. | |
fdb71f6a AM |
32 | |
33 | %prep | |
03278c9b ER |
34 | %setup -q |
35 | %patch0 -p1 | |
fdb71f6a AM |
36 | |
37 | %build | |
3d086971 | 38 | %configure \ |
39 | --with-ssl-lib-dir=%{_libdir} | |
fdb71f6a AM |
40 | %{__make} |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
6f1ff528 | 44 | install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,monit},%{_sbindir}} |
fdb71f6a AM |
45 | |
46 | %{__make} install \ | |
47 | DESTDIR=$RPM_BUILD_ROOT | |
48 | ||
49 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
6f726317 ER |
50 | # NOTE: 'include *.monitrc' will fail if nothing matches the glob. |
51 | install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monitrc | |
52 | install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc | |
6f1ff528 | 53 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/monit |
fdb71f6a AM |
54 | |
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %post | |
59 | /sbin/chkconfig --add %{name} | |
3d130d51 | 60 | %service monit restart "Monit Daemon" |
fdb71f6a AM |
61 | |
62 | %preun | |
63 | if [ "$1" = "0" ]; then | |
3d130d51 | 64 | %service monit stop |
14ec2da6 | 65 | /sbin/chkconfig --del %{name} |
fdb71f6a AM |
66 | fi |
67 | ||
68 | %files | |
69 | %defattr(644,root,root,755) | |
649566ce | 70 | %doc doc/*.html CHANGES.txt CONTRIBUTORS FAQ.txt README* |
2839c248 | 71 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc |
6f1ff528 | 72 | %dir %attr(751,root,root) %{_sysconfdir}/monit |
6f726317 | 73 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc |
6f1ff528 | 74 | %attr(755,root,root) %{_sbindir}/monit |
fdb71f6a | 75 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
2839c248 | 76 | %{_mandir}/man?/* |