]> git.pld-linux.org Git - packages/alarmwatch.git/blob - alarmwatch.spec
acef668d088b12b7bda8152f225ffcbfe47e8aaf
[packages/alarmwatch.git] / alarmwatch.spec
1 Summary:        Daemon that watches lm_sensors and beeps on alarms
2 Summary(pl):    Demon kontroluj±cy stan lm_sensors i piszczacy 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 Source1:        %{name}.init
10 Source2:        %{name}.sysconfig
11 URL:            http://www.azstarnet.com/~donut/programs/alarmwatch.html
12 BuildRequires:  autoconf
13 PreReq:         rc-scripts
14 Requires(post,preun):   /sbin/chkconfig
15 Requires:       lm_sensors
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 alarmwatch watches the lm_sensors /proc filesystem for the chips you
20 specify, and alerts you by beeping and syslog messages when an alarm
21 that is not ignored is active.
22
23 %description -l pl
24 alarmwatch kontroluje stan wybranych uk³adów poprzez lm_sensors w
25 systemie plików /proc i ostrzega piskami oraz komunikatami w logach,
26 kiedy nie ignorowany alarm jest aktywny.
27
28 %prep
29 %setup -q
30
31 %build
32 autoconf
33 %configure
34
35 %{__make}
36
37 gzip -9nf README Changelog
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
42         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
43
44 install alarmwatch $RPM_BUILD_ROOT%{_sbindir}
45 sed -e 's@alarmwatch 1@alarmwatch 8@' alarmwatch.1 \
46         > $RPM_BUILD_ROOT%{_mandir}/man8/alarmwatch.8
47
48 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/alarmwatch
49 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/alarmwatch
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %post
55 /sbin/chkconfig --add alarmwatch
56 if [ -f /var/lock/subsys/alarmwatch ]; then
57         /etc/rc.d/init.d/gpm alarmwatch >&2
58 else
59         echo "Run \"/etc/rc.d/init.d/alarmwatch start\" to start alarmwatch daemon."
60         echo "Remember to configure it first!"
61 fi
62
63 %preun
64 if [ "$1" = "0" ]; then
65         if [ -f /var/lock/subsys/alarmwatch ]; then
66                 /etc/rc.d/init.d/alarmwatch stop >&2
67         fi
68         /sbin/chkconfig --del alarmwatch
69 fi
70
71 %files
72 %defattr(644,root,root,755)
73 %doc *.gz
74 %attr(755,root,root) %{_sbindir}/*
75 %{_mandir}/man8/*
76 %attr(754,root,root) /etc/rc.d/init.d/alarmwatch
77 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/alarmwatch
This page took 0.075929 seconds and 2 git commands to generate.