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