]> git.pld-linux.org Git - packages/monit.git/blob - monit.spec
add release notes url
[packages/monit.git] / monit.spec
1 #
2 # Conditional build:
3 %bcond_without  pam             # PAM support
4 %bcond_without  ssl             # SSL support
5
6 # NOTES:
7 # - Release notes: https://mmonit.com/monit/changes/
8
9 Summary:        Process monitor and restart utility
10 Summary(pl.UTF-8):      Narzędzie do monitorowania procesów i ich restartowania
11 Name:           monit
12 Version:        5.15
13 Release:        1
14 License:        AGPL v3
15 Group:          Daemons
16 Source0:        http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
17 # Source0-md5:  c723745298d7ba6d28194b9f25eba6fe
18 Source1:        %{name}.init
19 Source2:        %{name}rc
20 Source3:        %{name}.config
21 Patch0:         config.patch
22 URL:            http://mmonit.com/monit/
23 BuildRequires:  bison
24 BuildRequires:  flex
25 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
26 %{?with_pam:BuildRequires:      pam-devel}
27 BuildRequires:  rpmbuild(macros) >= 1.268
28 Requires(post,preun):   /sbin/chkconfig
29 Requires:       rc-scripts >= 0.4.0.15
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 monit is an utility for monitoring daemons or similar programs running
34 on a Unix system. It will start specified programs if they are not
35 running and restart programs not responding.
36
37 %description -l pl.UTF-8
38 monit jest narzędziem do monitorowania demonów oraz podobnych
39 programów pracujących w systemie Unix. monit zrestartuje podany
40 program w momencie gdy przestaje on pracować lub w momencie gdy
41 program przestaje odpowiadać.
42
43 %prep
44 %setup -q
45 %patch0 -p1
46
47 %build
48 %configure \
49         --bindir=%{_sbindir} \
50         %{__with_without ssl} \
51         %{__with_without pam} \
52         --with-ssl-lib-dir=%{_libdir}
53 %{__make}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit,sysconfig}
58 %{__make} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
62 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit
63
64 cp -p monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
65 # NOTE: 'include *.monitrc' will fail if nothing matches the glob.
66 # so install dummy config not to remove it with upgrades (avoid .rpmsave)
67 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %post
73 /sbin/chkconfig --add %{name}
74 %service monit restart "Monit Daemon"
75
76 %preun
77 if [ "$1" = "0" ]; then
78         %service monit stop
79         /sbin/chkconfig --del %{name}
80 fi
81
82 %files
83 %defattr(644,root,root,755)
84 %doc CONTRIBUTORS README*
85 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monitrc
86 %dir %attr(751,root,root) %{_sysconfdir}/%{name}
87 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
88 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
89 %attr(754,root,root) /etc/rc.d/init.d/%{name}
90 %attr(755,root,root) %{_sbindir}/monit
91 %{_mandir}/man1/monit.1*
This page took 0.076509 seconds and 4 git commands to generate.