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