]> git.pld-linux.org Git - packages/monit.git/blame - monit.spec
- release 2 (by relup.sh)
[packages/monit.git] / monit.spec
CommitLineData
b0768214
ER
1# TODO
2# - package systemd units
569cdae1
ER
3#
4# Conditional build:
5%bcond_without pam # PAM support
6%bcond_without ssl # SSL support
7
ed5da8a8
ER
8# NOTES:
9# - Release notes: https://mmonit.com/monit/changes/
10
fdb71f6a 11Summary: Process monitor and restart utility
e78603a4 12Summary(pl.UTF-8): Narzędzie do monitorowania procesów i ich restartowania
14b3c34c 13Name: monit
b0768214 14Version: 5.19.0
b89eb50c 15Release: 2
4b7f41ce 16License: AGPL v3
6cefd882 17Group: Daemons
e0057d64 18Source0: http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
b0768214 19# Source0-md5: 51ee50dd71e1bb9fe9a128bc88456b77
14b3c34c 20Source1: %{name}.init
6f726317 21Source2: %{name}rc
e09b5b4a 22Source3: %{name}.config
4b7f41ce 23Patch0: config.patch
e0057d64 24URL: http://mmonit.com/monit/
fdb71f6a
AM
25BuildRequires: bison
26BuildRequires: flex
569cdae1
ER
27%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
28%{?with_pam:BuildRequires: pam-devel}
3d130d51 29BuildRequires: rpmbuild(macros) >= 1.268
14b3c34c 30Requires(post,preun): /sbin/chkconfig
976db287 31Requires: rc-scripts >= 0.4.0.15
fdb71f6a
AM
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
b8a62915
JR
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ć.
fdb71f6a
AM
44
45%prep
03278c9b 46%setup -q
4b7f41ce 47%patch0 -p1
fdb71f6a
AM
48
49%build
3d086971 50%configure \
4b7f41ce 51 --bindir=%{_sbindir} \
569cdae1
ER
52 %{__with_without ssl} \
53 %{__with_without pam} \
3d086971 54 --with-ssl-lib-dir=%{_libdir}
fdb71f6a
AM
55%{__make}
56
57%install
58rm -rf $RPM_BUILD_ROOT
4b7f41ce 59install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit,sysconfig}
fdb71f6a
AM
60%{__make} install \
61 DESTDIR=$RPM_BUILD_ROOT
62
4b7f41ce
ER
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
6f726317 67# NOTE: 'include *.monitrc' will fail if nothing matches the glob.
4b7f41ce
ER
68# so install dummy config not to remove it with upgrades (avoid .rpmsave)
69cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
fdb71f6a
AM
70
71%clean
72rm -rf $RPM_BUILD_ROOT
73
74%post
75/sbin/chkconfig --add %{name}
3d130d51 76%service monit restart "Monit Daemon"
fdb71f6a
AM
77
78%preun
79if [ "$1" = "0" ]; then
3d130d51 80 %service monit stop
14ec2da6 81 /sbin/chkconfig --del %{name}
fdb71f6a
AM
82fi
83
84%files
85%defattr(644,root,root,755)
4b7f41ce
ER
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}
6f726317 89%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
4b7f41ce 90%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
fdb71f6a 91%attr(754,root,root) /etc/rc.d/init.d/%{name}
4b7f41ce
ER
92%attr(755,root,root) %{_sbindir}/monit
93%{_mandir}/man1/monit.1*
This page took 0.07234 seconds and 4 git commands to generate.