]> git.pld-linux.org Git - packages/watchdog.git/blob - watchdog.spec
- perl -pi -e "s/^automake -a -c$/automake -a -c -f/"
[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:        2
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 -a -c -f
40 %configure \
41         --prefix=%{_prefix}
42 %{__make}
43
44 %install
45 rm -rf $RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
47
48 %{__make} install DESTDIR=$RPM_BUILD_ROOT
49
50 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/watchdog
51 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/watchdog
52
53 gzip -9nf ChangeLog README NEWS AUTHORS IAFA-PACKAGE TODO examples/*
54
55 %clean
56 rm -rf $RPM_BUILD_ROOT
57
58 %post
59 /sbin/chkconfig --add watchdog
60 if [ -f /var/lock/subsys/watchdog ]; then
61         /etc/rc.d/init.d/watchdog restart 1>&2
62 else
63         echo "Run \"/etc/rc.d/init.d/watchdog start\" to start watchdog daemon."
64 fi
65
66 %preun
67 if [ "$1" = 0 ] ; then
68         if [ -f /var/lock/subsys/watchdog ]; then
69                 /etc/rc.d/init.d/watchdog stop 1>&2
70         fi
71         /sbin/chkconfig --del watchdog
72 fi
73
74 %files
75 %defattr(644,root,root,755)
76 %doc *.gz examples/*.gz
77 %{_mandir}/man?/*
78 %attr(755,root,root) %{_sbindir}/watchdog
79 %attr(755,root,root) %config /etc/rc.d/init.d/watchdog
80 %attr(755,root,root) %config /etc/sysconfig/watchdog
81 %config(noreplace) %{_sysconfdir}/watchdog.conf
This page took 0.102451 seconds and 3 git commands to generate.