]> git.pld-linux.org Git - packages/apmud.git/blob - apmud.spec
3dd710d6c435426122e3f9d34fd073db9706ffad
[packages/apmud.git] / apmud.spec
1 Summary:        Power Manager daemon for Apple PowerBooks
2 Summary(pl):    Demon zarz±dzaj±cy poborem energii dla komputerów Apple PowerBook
3 Name:           apmud
4 Version:        1.0.0
5 Release:        1
6 License:        GPL
7 Group:          Applications/System
8 Source0:        http://linuxppc.jvc.nl/%{name}-%{version}.tgz
9 # Source0-md5:  51f3d8a65e92d26ceee7b2e9e06773d3
10 Source1:        %{name}.init
11 Patch0:         %{name}-pwrctl.patch
12 URL:            http://linuxppc.jvc.nl/
13 Requires(post,preun):   /sbin/chkconfig
14 Requires:       dev
15 Requires:       hdparm
16 Provides:       apmd
17 Obsoletes:      apmd
18 ExclusiveArch:  ppc
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 pmud is a daemon which periodically polls the PMU (power manager) and
23 performs functions such as enabling or disabling devices appropriately
24 when the power source changes. It can also be instructed to signal
25 init(8) that a power-failure has occured.
26
27 %description -l pl
28 pmud to demon regularnie odpytuj±cy PMU (jednostkê zarz±dzaj±ce
29 energi±) i wykonuj±cy funkcje takie jak w³±czanie i wy³±czanie
30 urz±dzeñ odpowiednio do zmian ¼ród³a zasilania. Mo¿e tak¿e powiadomiæ
31 proces init o wyst±pieniu awarii zasilania.
32
33 %prep
34 %setup -q -n %{name}
35 %patch0 -p1
36
37 %build
38 %{__make}
39
40 %install
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_sbindir},%{_bindir},%{_mandir}/man8} \
43         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,power}
44
45 install pmud snooze wakebay fblevel $RPM_BUILD_ROOT%{_sbindir}
46 install Batmon $RPM_BUILD_ROOT%{_bindir}
47 install xmouse $RPM_BUILD_ROOT%{_bindir}
48
49 install pmud.8 snooze.8 fblevel.8 batmon.8 $RPM_BUILD_ROOT%{_mandir}/man8
50 install xmouse.8 $RPM_BUILD_ROOT%{_mandir}/man8
51
52 install power.conf $RPM_BUILD_ROOT/etc/sysconfig/power
53 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pmud
54 install pwrctl $RPM_BUILD_ROOT%{_sysconfdir}/power/pwrctl
55
56 ln -sf %{_sbindir}/snooze $RPM_BUILD_ROOT%{_bindir}/apm
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %post
62 /sbin/chkconfig --add pmud
63 if [ -f /var/lock/subsys/pmud ]; then
64         /etc/rc.d/init.d/pmud restart >&2
65 else
66         echo "Run \"/etc/rc.d/init.d/pmud start\" to start pmud daemon."
67 fi
68
69 %preun
70 if [ "$1" = "0" ]; then
71         if [ -f /var/lock/subsys/pmud ]; then
72                 /etc/rc.d/init.d/pmud stop >&2
73         fi
74         /sbin/chkconfig --del pmud
75 fi
76
77 %files
78 %defattr(644,root,root,755)
79 %doc BUGS CHANGES INSTALL README THANKS TODO pwrctl-local
80 %attr(755,root,root) %{_sbindir}/*
81 %attr(755,root,root) %{_bindir}/*
82 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/power
83 %attr(754,root,root) /etc/rc.d/init.d/pmud
84 %dir %{_sysconfdir}/power
85 %attr(640,root,root) %{_sysconfdir}/power/pwrctl
86 %{_mandir}/man8/*
This page took 0.097854 seconds and 3 git commands to generate.