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