]> git.pld-linux.org Git - packages/watchdog.git/blobdiff - watchdog.spec
- up to 5.16
[packages/watchdog.git] / watchdog.spec
index 5e882220dc8d675bb2b23997fb921363bfd72d52..39ad1b0ce9f89c5a88865b8dabf045f274c33bda 100644 (file)
@@ -1,40 +1,49 @@
+# TODO:
+# - resolve limit of interface traffic:
+#   http://bugs.gentoo.org/attachment.cgi?id=80309&action=view
+# - check which of these patches can be applied:
+#   http://www.christoph-probst.com/technik/software/watchdog/5.2.4/
+# - separate package with init-script for wd_keepalive - some parts should
+#   be in -common subpackage.
 Summary:       A software watchdog
-Summary(pl):   Programowy stra¿nik
+Summary(pl.UTF-8):     Programowy strażnik
 Name:          watchdog
-Version:       5.2
-Release:       3
+Version:       5.16
+Release:       1
 License:       GPL
-Group:         Applications/System
-Vendor:                Michael Meskes <meskes@debian.org>
-Source0:       ftp://tsx-11.mit.edu/pub/linux/sources/sbin/%{name}-%{version}.tar.gz
+Group:         Daemons
+Source0:       http://ftp.debian.org/debian/pool/main/w/watchdog/%{name}_%{version}.orig.tar.gz
+# Source0-md5: 1b4f51cabc64d1bee2fce7cdd626831f
 Source1:       %{name}.init
 Source2:       %{name}.sysconfig
+Patch0:                %{name}-foreground.patch
+Patch1:                %{name}-config.patch
 BuildRequires: autoconf
 BuildRequires: automake
-Prereq:                /sbin/chkconfig
-Prereq:                rc-scripts
-Buildroot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 The watchdog program writes to /dev/watchdog every ten seconds. If the
 device is open but not written to within a minute the machine will
 reboot. Each write delays the reboot time another minute. The ability
-to reboot will depend on the state of the machines and interrupts. To
-use this software at least a version 1.3.52 kernel is needed.
+to reboot will depend on the state of the machines and interrupts.
 
-%description -l pl
-Program watchdog zapisuje do /dev/watchdog co 10 sekund. Je¿eli
-urz±dzenie jest otwarte, ale nic nie zostanie zapisane przez minutê,
-maszyna siê zrebootuje. Ka¿dy zapis opó¼nia reboot o minutê. Mo¿liwo¶æ
-rebootu zale¿y od stanu maszyny i przerwañ. Do tego programu potrzebne
-jest j±dro w wersji co najmniej 1.3.52.
+%description -l pl.UTF-8
+Program watchdog zapisuje do /dev/watchdog co 10 sekund. Jeżeli
+urządzenie jest otwarte, ale nic nie zostanie zapisane przez minutę,
+maszyna się zrebootuje. Każdy zapis opóźnia reboot o minutę. Możliwość
+rebootu zależy od stanu maszyny i przerwań.
 
 %prep
 %setup -q
+#%patch0 -p1
+%patch1 -p1
 
 %build
-rm -f missing
-aclocal
+%{__aclocal}
 %{__autoconf}
 %{__automake}
 %configure
@@ -44,7 +53,8 @@ aclocal
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
 
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/watchdog
 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/watchdog
@@ -54,25 +64,19 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add watchdog
-if [ -f /var/lock/subsys/watchdog ]; then
-       /etc/rc.d/init.d/watchdog restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/watchdog start\" to start watchdog daemon."
-fi
+%service watchdog restart "watchdog daemon"
 
 %preun
 if [ "$1" = 0 ] ; then
-       if [ -f /var/lock/subsys/watchdog ]; then
-               /etc/rc.d/init.d/watchdog stop 1>&2
-       fi
+       %service watchdog stop
        /sbin/chkconfig --del watchdog
 fi
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog README NEWS AUTHORS IAFA-PACKAGE TODO examples/*
+%doc ChangeLog README NEWS AUTHORS IAFA-PACKAGE TODO examples
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/watchdog.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/watchdog
+%attr(754,root,root) /etc/rc.d/init.d/watchdog
+%attr(755,root,root) %{_sbindir}/*
 %{_mandir}/man?/*
-%attr(755,root,root) %{_sbindir}/watchdog
-%attr(755,root,root) %config /etc/rc.d/init.d/watchdog
-%attr(755,root,root) %config /etc/sysconfig/watchdog
-%config(noreplace) %{_sysconfdir}/watchdog.conf
This page took 0.281212 seconds and 4 git commands to generate.