]> git.pld-linux.org Git - packages/monit.git/blobdiff - monit.spec
- rel 2
[packages/monit.git] / monit.spec
index bffcfcf27a1c33edeceed3505a46973571c97600..dfd18b995579dabe86bb17013520dc1d08c3906e 100644 (file)
@@ -1,19 +1,23 @@
+#
 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.2.1
-Release:       0.3
+Version:       5.0.3
+Release:       2
+License:       GPL v3+
 Group:         Applications/Console
-License:       GPL
-Source0:       http://www.tildeslash.com/monit/dist/%{name}-%{version}.tar.gz
-# Source0-md5: ce436eb5977be60aff5d8b2a1eba2ade
+Source0:       http://mmonit.com/monit/dist/%{name}-%{version}.tar.gz
+# Source0-md5: dae7859ec10551fc941daeae60dee9d3
 Source1:       %{name}.init
-URL:           http://www.tildeslash.com/monit/
+Source2:       %{name}rc
+Source3:       %{name}.config
+URL:           http://mmonit.com/monit/
 BuildRequires: bison
 BuildRequires: flex
 BuildRequires: openssl-devel >= 0.9.7d
-PreReq:                rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts >= 0.4.0.15
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -21,49 +25,44 @@ 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 podonych 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
 
 %build
-%configure
+%configure \
+       --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},%{_sbindir}}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-# include all files provided by services:
-echo "include /etc/monit/*.monitrc" >> monitrc.main
-
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install monitrc.main $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
+# NOTE: 'include *.monitrc' will fail if nothing matches the glob.
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/monit
 install monitrc $RPM_BUILD_ROOT%{_sysconfdir}/monit/default.monitrc
+mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/monit
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add %{name}
-if [ -f %{_var}/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
-fi
+%service monit restart "Monit Daemon"
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f %{_var}/lock/subsys/%{name} ]; then
-               /etc/rc.d/init.d/%{name} stop 1>&2
-       fi
+       %service monit stop
        /sbin/chkconfig --del %{name}
 fi
 
@@ -71,7 +70,9 @@ fi
 %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(755,root,root) %{_bindir}/*
+%dir %attr(751,root,root) %{_sysconfdir}/monit
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/monit
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default.monitrc
+%attr(755,root,root) %{_sbindir}/monit
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %{_mandir}/man?/*
This page took 0.044111 seconds and 4 git commands to generate.