]>
Commit | Line | Data |
---|---|---|
1 | Summary: Daemon that watches lm_sensors and beeps on alarms | |
2 | Summary(pl.UTF-8): Demon kontrolujący stan lm_sensors i piszczący podczas alarmów | |
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 | |
9 | # Source0-md5: 8a905a4746fdb028257af842afe748db | |
10 | Source1: %{name}.init | |
11 | Source2: %{name}.sysconfig | |
12 | URL: http://www.azstarnet.com/~donut/programs/alarmwatch.html | |
13 | BuildRequires: autoconf | |
14 | BuildRequires: rpmbuild(macros) >= 1.268 | |
15 | Requires(post,preun): /sbin/chkconfig | |
16 | Requires: lm_sensors | |
17 | Requires: rc-scripts | |
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 | ||
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, | |
28 | kiedy nie ignorowany alarm jest aktywny. | |
29 | ||
30 | %prep | |
31 | %setup -q | |
32 | ||
33 | %build | |
34 | %{__autoconf} | |
35 | %configure | |
36 | %{__make} | |
37 | ||
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 | |
55 | %service alarmwatch restart "alarmwatch daemon" | |
56 | if [ "$1" = 1 ]; then | |
57 | echo "Remember to configure it first!" | |
58 | fi | |
59 | ||
60 | %preun | |
61 | if [ "$1" = "0" ]; then | |
62 | %service alarmwatch stop | |
63 | /sbin/chkconfig --del alarmwatch | |
64 | fi | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %doc README Changelog | |
69 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/alarmwatch | |
70 | %attr(754,root,root) /etc/rc.d/init.d/alarmwatch | |
71 | %attr(755,root,root) %{_sbindir}/* | |
72 | %{_mandir}/man8/* |