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