]> git.pld-linux.org Git - packages/watchdog.git/blob - watchdog.spec
- simplification in %build.
[packages/watchdog.git] / watchdog.spec
1 Summary:        A software watchdog
2 Summary(pl):    Programowy stra¿nik
3 Name:           watchdog
4 Version:        5.2
5 Release:        3
6 License:        GPL
7 Group:          Applications/System
8 Vendor:         Michael Meskes <meskes@debian.org>
9 Source0:        ftp://tsx-11.mit.edu/pub/linux/sources/sbin/%{name}-%{version}.tar.gz
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 BuildRequires:  autoconf
13 BuildRequires:  automake
14 Prereq:         /sbin/chkconfig
15 Prereq:         rc-scripts
16 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 The watchdog program writes to /dev/watchdog every ten seconds. If the
20 device is open but not written to within a minute the machine will
21 reboot. Each write delays the reboot time another minute. The ability
22 to reboot will depend on the state of the machines and interrupts. To
23 use this software at least a version 1.3.52 kernel is needed.
24
25 %description -l pl
26 Program watchdog zapisuje do /dev/watchdog co 10 sekund. Je¿eli
27 urz±dzenie jest otwarte, ale nic nie zostanie zapisane przez minutê,
28 maszyna siê zrebootuje. Ka¿dy zapis opó¼nia reboot o minutê. Mo¿liwo¶æ
29 rebootu zale¿y od stanu maszyny i przerwañ. Do tego programu potrzebne
30 jest j±dro w wersji co najmniej 1.3.52.
31
32 %prep
33 %setup -q
34
35 %build
36 rm -f missing
37 aclocal
38 %{__autoconf}
39 %{__automake}
40 %configure
41 %{__make}
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
46
47 %{__make} install DESTDIR=$RPM_BUILD_ROOT
48
49 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/watchdog
50 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/watchdog
51
52 %clean
53 rm -rf $RPM_BUILD_ROOT
54
55 %post
56 /sbin/chkconfig --add watchdog
57 if [ -f /var/lock/subsys/watchdog ]; then
58         /etc/rc.d/init.d/watchdog restart 1>&2
59 else
60         echo "Run \"/etc/rc.d/init.d/watchdog start\" to start watchdog daemon."
61 fi
62
63 %preun
64 if [ "$1" = 0 ] ; then
65         if [ -f /var/lock/subsys/watchdog ]; then
66                 /etc/rc.d/init.d/watchdog stop 1>&2
67         fi
68         /sbin/chkconfig --del watchdog
69 fi
70
71 %files
72 %defattr(644,root,root,755)
73 %doc ChangeLog README NEWS AUTHORS IAFA-PACKAGE TODO examples/*
74 %{_mandir}/man?/*
75 %attr(755,root,root) %{_sbindir}/watchdog
76 %attr(755,root,root) %config /etc/rc.d/init.d/watchdog
77 %attr(755,root,root) %config /etc/sysconfig/watchdog
78 %config(noreplace) %{_sysconfdir}/watchdog.conf
This page took 0.07053 seconds and 3 git commands to generate.