]> git.pld-linux.org Git - packages/monit.git/blobdiff - monit.spec
up to 5.19.0
[packages/monit.git] / monit.spec
index c966c03359c5217e0f9cad6f675d181fded634c4..1bf97418c007427999b3c36046a478851a865552 100644 (file)
@@ -1,21 +1,34 @@
+# TODO
+# - package systemd units
+#
+# Conditional build:
+%bcond_without pam             # PAM support
+%bcond_without ssl             # SSL support
+
+# NOTES:
+# - Release notes: https://mmonit.com/monit/changes/
+
 Summary:       Process monitor and restart utility
-Summary(pl):   Narzêdzie do monitorowania procesów i ich restartowania
+Summary(pl.UTF-8):     Narzędzie do monitorowania procesów i ich restartowania
 Name:          monit
-Version:       4.8.2
+Version:       5.19.0
 Release:       1
-License:       GPL
-Group:         Applications/Console
-Source0:       http://www.tildeslash.com/monit/dist/%{name}-%{version}.tar.gz
-# Source0-md5: e7ad6056c71becf014653f6597d110ca
+License:       AGPL v3
+Group:         Daemons
+Source0:       http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
+# Source0-md5: 51ee50dd71e1bb9fe9a128bc88456b77
 Source1:       %{name}.init
-Patch0:                %{name}-localhost-http.patch
-URL:           http://www.tildeslash.com/monit/
+Source2:       %{name}rc
+Source3:       %{name}.config
+Patch0:                config.patch
+URL:           http://mmonit.com/monit/
 BuildRequires: bison
 BuildRequires: flex
-BuildRequires: openssl-devel >= 0.9.7d
+%{?with_ssl:BuildRequires:     openssl-devel >= 0.9.7d}
+%{?with_pam:BuildRequires:     pam-devel}
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
-Requires:      rc-scripts
+Requires:      rc-scripts >= 0.4.0.15
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -23,11 +36,11 @@ monit is an utility for monitoring daemons or similar programs running
 on a Unix system. It will start specified programs if they are not
 running and restart programs not responding.
 
-%description -l pl
-monit jest narzêdziem do monitorowania demonów oraz podobnych
-programów pracuj±cych w systemie Unix. monit zrestartuje podany
-program w momencie gdy przestaje on pracowaæ lub w momencie gdy
-program przestaje odpowiadaæ.
+%description -l pl.UTF-8
+monit jest narzędziem do monitorowania demonów oraz podobnych
+programów pracujących w systemie Unix. monit zrestartuje podany
+program w momencie gdy przestaje on pracować lub w momencie gdy
+program przestaje odpowiadać.
 
 %prep
 %setup -q
@@ -35,22 +48,25 @@ program przestaje odpowiada
 
 %build
 %configure \
+       --bindir=%{_sbindir} \
+       %{__with_without ssl} \
+       %{__with_without pam} \
        --with-ssl-lib-dir=%{_libdir}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit}
-
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit,sysconfig}
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-# include all files provided by services:
-echo "include %{_sysconfdir}/monit/*.monitrc" >> monitrc.main
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install monitrc.main $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
-install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
+cp -p monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
+# NOTE: 'include *.monitrc' will fail if nothing matches the glob.
+# so install dummy config not to remove it with upgrades (avoid .rpmsave)
+cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -67,10 +83,11 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc doc/*.html CHANGES.txt CONTRIBUTORS FAQ.txt README*
-%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}rc
-%attr(751,root,root) %dir %{_sysconfdir}/monit
-%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
-%attr(755,root,root) %{_bindir}/*
+%doc CONTRIBUTORS README*
+%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monitrc
+%dir %attr(751,root,root) %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
-%{_mandir}/man?/*
+%attr(755,root,root) %{_sbindir}/monit
+%{_mandir}/man1/monit.1*
This page took 0.396037 seconds and 4 git commands to generate.