]> git.pld-linux.org Git - packages/watchdog.git/blob - watchdog.spec
- up to 5.9
[packages/watchdog.git] / watchdog.spec
1 # TODO:
2 # - resolve limit of interface traffic:
3 #   http://bugs.gentoo.org/attachment.cgi?id=80309&action=view
4 # - check which of these patches can be applied:
5 #   http://www.christoph-probst.com/technik/software/watchdog/5.2.4/
6 # - separate package with init-script for wd_keepalive - some parts should
7 #   be in -common subpackage.
8 Summary:        A software watchdog
9 Summary(pl.UTF-8):      Programowy strażnik
10 Name:           watchdog
11 Version:        5.9
12 Release:        1
13 License:        GPL
14 Group:          Daemons
15 Source0:        ftp://ftp.debian.org/debian/pool/main/w/watchdog/%{name}_%{version}.orig.tar.gz
16 # Source0-md5:  d7cae3c9829f5d9a680764f314234867
17 Source1:        %{name}.init
18 Source2:        %{name}.sysconfig
19 Patch0:         %{name}-foreground.patch
20 Patch1:         %{name}-config.patch
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  rpmbuild(macros) >= 1.268
24 Requires(post,preun):   /sbin/chkconfig
25 Requires:       rc-scripts
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 The watchdog program writes to /dev/watchdog every ten seconds. If the
30 device is open but not written to within a minute the machine will
31 reboot. Each write delays the reboot time another minute. The ability
32 to reboot will depend on the state of the machines and interrupts.
33
34 %description -l pl.UTF-8
35 Program watchdog zapisuje do /dev/watchdog co 10 sekund. Jeżeli
36 urządzenie jest otwarte, ale nic nie zostanie zapisane przez minutę,
37 maszyna się zrebootuje. Każdy zapis opóźnia reboot o minutę. Możliwość
38 rebootu zależy od stanu maszyny i przerwań.
39
40 %prep
41 %setup -q
42 #%patch0 -p1
43 %patch1 -p1
44
45 %build
46 %{__aclocal}
47 %{__autoconf}
48 %{__automake}
49 %configure
50 %{__make}
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
55
56 %{__make} install \
57         DESTDIR=$RPM_BUILD_ROOT
58
59 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/watchdog
60 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/watchdog
61
62 %clean
63 rm -rf $RPM_BUILD_ROOT
64
65 %post
66 /sbin/chkconfig --add watchdog
67 %service watchdog restart "watchdog daemon"
68
69 %preun
70 if [ "$1" = 0 ] ; then
71         %service watchdog stop
72         /sbin/chkconfig --del watchdog
73 fi
74
75 %files
76 %defattr(644,root,root,755)
77 %doc ChangeLog README NEWS AUTHORS IAFA-PACKAGE TODO examples
78 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/watchdog.conf
79 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/watchdog
80 %attr(754,root,root) /etc/rc.d/init.d/watchdog
81 %attr(755,root,root) %{_sbindir}/*
82 %{_mandir}/man?/*
This page took 0.108289 seconds and 3 git commands to generate.