]> git.pld-linux.org Git - packages/alarmwatch.git/blob - alarmwatch.spec
- updated
[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 %install
38 rm -rf $RPM_BUILD_ROOT
39 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8} \
40         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
41
42 install alarmwatch $RPM_BUILD_ROOT%{_sbindir}
43 sed -e 's@alarmwatch 1@alarmwatch 8@' alarmwatch.1 \
44         > $RPM_BUILD_ROOT%{_mandir}/man8/alarmwatch.8
45
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/alarmwatch
47 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/alarmwatch
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %post
53 /sbin/chkconfig --add alarmwatch
54 if [ -f /var/lock/subsys/alarmwatch ]; then
55         /etc/rc.d/init.d/gpm alarmwatch >&2
56 else
57         echo "Run \"/etc/rc.d/init.d/alarmwatch start\" to start alarmwatch daemon."
58         echo "Remember to configure it first!"
59 fi
60
61 %preun
62 if [ "$1" = "0" ]; then
63         if [ -f /var/lock/subsys/alarmwatch ]; then
64                 /etc/rc.d/init.d/alarmwatch stop >&2
65         fi
66         /sbin/chkconfig --del alarmwatch
67 fi
68
69 %files
70 %defattr(644,root,root,755)
71 %doc README Changelog
72 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/alarmwatch
73 %attr(754,root,root) /etc/rc.d/init.d/alarmwatch
74 %attr(755,root,root) %{_sbindir}/*
75 %{_mandir}/man8/*
This page took 0.096633 seconds and 3 git commands to generate.