--- rpms/watchdog/contribs7/watchdog.spec 2010/12/04 16:31:53 1.2 +++ rpms/watchdog/contribs7/watchdog.spec 2010/12/04 16:42:57 1.3 @@ -1,30 +1,25 @@ -# $Id$ +# $Id: watchdog.spec,v 1.2 2010/12/04 16:31:53 slords Exp $ # Authority: slords # Name: Shad L. Lords -Summary: Software and/or Hardware watchdog daemon -Name: watchdog -Version: 5.6 -Release: 1%{?dist} -License: GPL+ -Group: System Environment/Daemons - -URL: http://sourceforge.net/projects/watchdog/ -Source0: http://dl.sf.net/watchdog/watchdog-%{version}.tar.gz -Source1: watchdog.init -Source2: README.watchdog.ipmi - -Patch0: watchdog-5.6-cleanup.patch -Patch1: watchdog-5.6-quiet-write-warnings.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Requires(post): /sbin/chkconfig +Summary: Software and/or Hardware watchdog daemon +Name: watchdog +Version: 5.3.1 +Release: 7%{?dist} +License: GPL +Group: System Environment/Daemons +URL: http://sourceforge.net/projects/watchdog/ +Source0: http://dl.sf.net/watchdog/watchdog_%{version}.tar.gz +Source1: watchdog.init +Source2: README.watchdog.ipmi +Patch0: %{name}-%{version}-cleanup.patch +Patch1: %{name}-%{version}-cleanup-nfs.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires(post): /sbin/chkconfig Requires(postun): /sbin/chkconfig -Requires(post): /sbin/service +Requires(post): /sbin/service Requires(postun): /sbin/service - %description The watchdog program can be used as a powerful software watchdog daemon or may be alternately used with a hardware watchdog device such as the @@ -40,103 +35,66 @@ ability to reboot will depend on the sta When operating as a hardware watchdog, the machine will experience a hard reset (or whatever action was configured to be taken upon watchdog timer expiration) initiated by the BMC. - - + %prep %setup -q -n %{name}-%{version} - -%patch0 -p1 -b .cleanup -%patch1 -p1 -b .quiet-write-warnings - cp %{SOURCE2} . - -mv README README.orig -iconv -f ISO-8859-1 -t UTF-8 < README.orig > README - - +%patch0 -p1 +%patch1 -p1 %build %configure make %{?_smp_mflags} - %install -rm -rf ${RPM_BUILD_ROOT} +rm -Rf ${RPM_BUILD_ROOT} install -d -m0755 ${RPM_BUILD_ROOT}%{_sysconfdir} make DESTDIR=${RPM_BUILD_ROOT} install install -Dp -m0644 %{name}.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/watchdog install -Dp -m0755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_initrddir}/watchdog - %clean rm -Rf ${RPM_BUILD_ROOT} - %post if [ $1 -eq 1 ]; then - /sbin/chkconfig --add %{name} + /sbin/chkconfig --add %{name} fi - %preun if [ $1 -eq 0 ]; then - /sbin/service %{name} stop >/dev/null 2>&1 - /sbin/chkconfig --del %{name} + /sbin/service %{name} stop >/dev/null 2>&1 + /sbin/chkconfig --del %{name} fi - %postun if [ $1 -ge 1 ]; then - /sbin/service %{name} condrestart >/dev/null 2>&1 + /sbin/service %{name} condrestart >/dev/null 2>&1 fi %files -%defattr(-, root, root, -) +%defattr(-, root, root, 0755) %doc AUTHORS ChangeLog COPYING examples/ IAFA-PACKAGE NEWS README TODO README.watchdog.ipmi +%doc %{_mandir}/man5/watchdog.conf.5* +%doc %{_mandir}/man8/watchdog.8* %config(noreplace) %{_sysconfdir}/watchdog.conf %config(noreplace) %{_sysconfdir}/sysconfig/watchdog %{_sysconfdir}/rc.d/init.d/watchdog %{_sbindir}/watchdog %{_sbindir}/wd_keepalive -%{_mandir}/man5/watchdog.conf.5* -%{_mandir}/man8/watchdog.8* -%{_mandir}/man8/wd_keepalive.8* - %changelog -* Thu Mar 26 2009 Richard W.M. Jones - 5.6-1 -- Rebase to watchdog 5.6. -- Drop cleanup patch, since it is now upstream. -- Drop NFS cleanup patch, since it breaks NFS support for one call. -- Add patch for general cleanups (sent upstream 2009-03-26). -- Add patch to quiet write warnings about unused return values. - -* Thu Mar 12 2009 Richard W.M. Jones - 5.5-1 -- New upstream release 5.5 - Resolves: 446123 -- Synchronize the spec file formatting with Fedora. -- Upstream source URL has changed (_ into -). -- Convert README file to UTF-8. -- Fix defattr line. -- Manpages shouldn't be marked as doc. -- Added wd_keepalive manpage. - * Mon Jun 11 2007 Lon Hohberger - 5.3.1-7 - Rebuild for RHEL5 Update 1 - Resolves: 227401 - * Wed May 30 2007 Konrad Rzeszutek - 5.3.1-6 - Fixed the init script file. - * Tue May 29 2007 Konrad Rzeszutek - 5.3.1-5 - Fixed a compile warning in nfsmount_xdr file. - * Wed May 23 2007 Konrad Rzeszutek - 5.3.1-4 - Fixed rpmlint warnings. - * Wed May 16 2007 Konrad Rzeszutek - 5.3.1-3 - Changes to spec, init script and README file per Carol Hebert recommendation. - * Thu Apr 19 2007 Konrad Rzeszutek - 5.3.1-2 - Added README.watchdog.ipmi - * Mon Apr 16 2007 Konrad Rzeszutek - 5.3.1-1 - Initial copy.