]> git.pld-linux.org Git - packages/monit.git/blobdiff - monit.spec
- offical patch to 4.8.1
[packages/monit.git] / monit.spec
index 6f8adb5be8ed758888592ccf359aa14a982e2695..63f90e59e75a4822f82ebe2837270320647b3429 100644 (file)
@@ -1,19 +1,22 @@
 Summary:       Process monitor and restart utility
 Summary(pl):   Narzêdzie do monitorowania procesów i ich restartowania
 Name:          monit
-Version:       4.3
-Release:       2
-Group:         Applications/Console
+%define                _ver 4.8
+Version:       %{_ver}.1
+Release:       1
 License:       GPL
-Source0:       http://www.tildeslash.com/monit/dist/%{name}-%{version}.tar.gz
-# Source0-md5: 27cc61851d47af1566fe26db8ba1f969
+Group:         Applications/Console
+Source0:       http://www.tildeslash.com/monit/dist/%{name}-%{_ver}.tar.gz
+# Source0-md5: 376bd526ee5577a6f0a842216f8ccf25
 Source1:       %{name}.init
+Patch0:                http://www.tildeslash.com/monit/dist/%{name}-4.8-patch01
 URL:           http://www.tildeslash.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
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -22,13 +25,14 @@ 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æ.
+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
+%setup -q -n %{name}-%{_ver}
+%patch0 -p0
 
 %build
 %configure \
@@ -43,7 +47,7 @@ install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,monit}
        DESTDIR=$RPM_BUILD_ROOT
 
 # include all files provided by services:
-echo "include /etc/monit/*.monitrc" >> monitrc.main
+echo "include %{_sysconfdir}/monit/*.monitrc" >> monitrc.main
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 install monitrc.main $RPM_BUILD_ROOT%{_sysconfdir}/monitrc
@@ -54,17 +58,11 @@ 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
 
This page took 0.045048 seconds and 4 git commands to generate.