]> git.pld-linux.org Git - packages/monit.git/blob - monit.spec
up to 5.15; seems this version supports SPDY?
[packages/monit.git] / monit.spec
1 Summary:        Process monitor and restart utility
2 Summary(pl.UTF-8):      Narzędzie do monitorowania procesów i ich restartowania
3 Name:           monit
4 Version:        5.15
5 Release:        1
6 License:        AGPL v3
7 Group:          Daemons
8 Source0:        http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
9 # Source0-md5:  c723745298d7ba6d28194b9f25eba6fe
10 Source1:        %{name}.init
11 Source2:        %{name}rc
12 Source3:        %{name}.config
13 Patch0:         config.patch
14 URL:            http://mmonit.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 >= 0.4.0.15
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.UTF-8
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
36 %patch0 -p1
37
38 %build
39 %configure \
40         --bindir=%{_sbindir} \
41         --with-ssl-lib-dir=%{_libdir}
42 %{__make}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit,sysconfig}
47 %{__make} install \
48         DESTDIR=$RPM_BUILD_ROOT
49
50 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
51 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit
52
53 cp -p monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
54 # NOTE: 'include *.monitrc' will fail if nothing matches the glob.
55 # so install dummy config not to remove it with upgrades (avoid .rpmsave)
56 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %post
62 /sbin/chkconfig --add %{name}
63 %service monit restart "Monit Daemon"
64
65 %preun
66 if [ "$1" = "0" ]; then
67         %service monit stop
68         /sbin/chkconfig --del %{name}
69 fi
70
71 %files
72 %defattr(644,root,root,755)
73 %doc CONTRIBUTORS README*
74 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monitrc
75 %dir %attr(751,root,root) %{_sysconfdir}/%{name}
76 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
77 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
78 %attr(754,root,root) /etc/rc.d/init.d/%{name}
79 %attr(755,root,root) %{_sbindir}/monit
80 %{_mandir}/man1/monit.1*
This page took 0.074516 seconds and 4 git commands to generate.