]>
Commit | Line | Data |
---|---|---|
2d79e510 | 1 | Summary: Daemon that watches lm_sensors and beeps on alarms |
a5a4eef3 | 2 | Summary(pl.UTF-8): Demon kontrolujący stan lm_sensors i piszczący podczas alarmów |
2d79e510 JB |
3 | Name: alarmwatch |
4 | Version: 1.0 | |
5 | Release: 1 | |
6 | License: GPL | |
7 | Group: Daemons | |
8 | Source0: http://www.azstarnet.com/~donut/programs/alarmwatch/%{name}-%{version}.tar.gz | |
a115ab2c | 9 | # Source0-md5: 8a905a4746fdb028257af842afe748db |
2d79e510 JB |
10 | Source1: %{name}.init |
11 | Source2: %{name}.sysconfig | |
12 | URL: http://www.azstarnet.com/~donut/programs/alarmwatch.html | |
13 | BuildRequires: autoconf | |
309344d0 | 14 | BuildRequires: rpmbuild(macros) >= 1.268 |
2d79e510 JB |
15 | Requires(post,preun): /sbin/chkconfig |
16 | Requires: lm_sensors | |
309344d0 | 17 | Requires: rc-scripts |
2d79e510 JB |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
19 | ||
20 | %description | |
21 | alarmwatch watches the lm_sensors /proc filesystem for the chips you | |
22 | specify, and alerts you by beeping and syslog messages when an alarm | |
23 | that is not ignored is active. | |
24 | ||
8030e6c6 JR |
25 | %description -l pl.UTF-8 |
26 | alarmwatch kontroluje stan wybranych układów poprzez lm_sensors w | |
27 | systemie plików /proc i ostrzega piskami oraz komunikatami w logach, | |
2d79e510 JB |
28 | kiedy nie ignorowany alarm jest aktywny. |
29 | ||
30 | %prep | |
31 | %setup -q | |
32 | ||
33 | %build | |
0fd36170 | 34 | %{__autoconf} |
2d79e510 | 35 | %configure |
2d79e510 JB |
36 | %{__make} |
37 | ||
2d79e510 JB |
38 | %install |
39 | rm -rf $RPM_BUILD_ROOT | |
40 | install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \ | |
41 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} | |
42 | ||
43 | install alarmwatch $RPM_BUILD_ROOT%{_sbindir} | |
44 | sed -e 's@alarmwatch 1@alarmwatch 8@' alarmwatch.1 \ | |
45 | > $RPM_BUILD_ROOT%{_mandir}/man8/alarmwatch.8 | |
46 | ||
47 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/alarmwatch | |
48 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/alarmwatch | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %post | |
54 | /sbin/chkconfig --add alarmwatch | |
309344d0 ER |
55 | %service alarmwatch restart "alarmwatch daemon" |
56 | if [ "$1" = 1 ]; then | |
2d79e510 JB |
57 | echo "Remember to configure it first!" |
58 | fi | |
59 | ||
60 | %preun | |
61 | if [ "$1" = "0" ]; then | |
309344d0 | 62 | %service alarmwatch stop |
2d79e510 JB |
63 | /sbin/chkconfig --del alarmwatch |
64 | fi | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
c38c2e7c | 68 | %doc README Changelog |
3376458f | 69 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/alarmwatch |
d36de059 | 70 | %attr(754,root,root) /etc/rc.d/init.d/alarmwatch |
2d79e510 JB |
71 | %attr(755,root,root) %{_sbindir}/* |
72 | %{_mandir}/man8/* |