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