]> git.pld-linux.org Git - packages/monit.git/blob - monit.spec
- use functions
[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:        2
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 URL:            http://www.tildeslash.com/monit/
15 BuildRequires:  bison
16 BuildRequires:  flex
17 BuildRequires:  openssl-devel >= 0.9.7d
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 Requires(post,preun):   /sbin/chkconfig
20 Requires:       rc-scripts
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 monit is an utility for monitoring daemons or similar programs running
25 on a Unix system. It will start specified programs if they are not
26 running and restart programs not responding.
27
28 %description -l pl
29 monit jest narzêdziem do monitorowania demonów oraz podobnych
30 programów pracuj±cych w systemie Unix. monit zrestartuje podany
31 program w momencie gdy przestaje on pracowaæ lub w momencie gdy
32 program przestaje odpowiadaæ.
33
34 %prep
35 %setup -q -n %{name}-%{_ver}
36 %patch0 -p0
37
38 %build
39 %configure \
40         --with-ssl-lib-dir=%{_libdir}
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit}
46
47 %{__make} install \
48         DESTDIR=$RPM_BUILD_ROOT
49
50 # include all files provided by services:
51 echo "include %{_sysconfdir}/monit/*.monitrc" >> monitrc.main
52
53 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
54 install monitrc.main $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
55 install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
56
57 %clean
58 rm -rf $RPM_BUILD_ROOT
59
60 %post
61 /sbin/chkconfig --add %{name}
62 %service monit restart "Monit Daemon"
63
64 %preun
65 if [ "$1" = "0" ]; then
66         %service monit stop
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.027777 seconds and 3 git commands to generate.