2 # - better event handling in power.sh
3 # - better default configuration of events in /etc/acpi
4 # - processor and fan module support (?)
5 Summary: ACPI Event Daemon
6 Summary(pl): Demon zdarzeñ ACPI
12 Source0: http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz
13 # Source0-md5: 3aff94e92186e99ed5fd6dcee2db7c74
15 Source2: %{name}.sysconfig
16 Source3: %{name}.logrotate
17 Source4: %{name}.halt_on_power_button.conf
18 Patch0: %{name}-powersh_fix.patch
19 Patch1: %{name}-gcc4.patch
20 URL: http://acpid.sourceforge.net/
22 Requires(post,preun): /sbin/chkconfig
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 acpid is a daemon that dispatches ACPI events to user-space programs.
31 acpid to demon przekazuj±cy zdarzenia ACPI do programów w user-space.
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \
44 $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8}
46 install acpid $RPM_BUILD_ROOT%{_sbindir}
47 install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8
48 install samples/sample.conf $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
49 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
50 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
51 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid
52 install samples/acpi_handler.sh $RPM_BUILD_ROOT%{_sbindir}/power.sh
53 # Or create halt_on_power_button subpackage
54 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
57 > $RPM_BUILD_ROOT/var/log/acpid
60 rm -rf $RPM_BUILD_ROOT
63 /sbin/chkconfig --add acpid
64 if [ -f /var/lock/subsys/acpid ]; then
65 /etc/rc.d/init.d/acpid restart >&2
67 echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon."
71 if [ "$1" = "0" ]; then
72 if [ -f /var/lock/subsys/acpid ]; then
73 /etc/rc.d/init.d/acpid stop>&2
75 /sbin/chkconfig --del acpid
78 # %post halt_on_power_button
79 # if [ -f /var/lock/subsys/acpid ]; then
80 # /etc/rc.d/init.d/acpid reload
83 # %postun halt_on_power_button
84 # if [ -f /var/lock/subsys/acpid ]; then
85 # /etc/rc.d/init.d/acpid reload
89 %defattr(644,root,root,755)
90 %doc Changelog README TODO
91 %dir %{_sysconfdir}/acpi
92 %dir %{_sysconfdir}/acpi/events
93 %dir %{_sysconfdir}/acpi/actions
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/acpid
95 %attr(754,root,root) /etc/rc.d/init.d/acpid
96 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/acpid
97 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/*.conf
98 %attr(755,root,root) %{_sbindir}/acpid
99 %attr(755,root,root) %{_sbindir}/power.sh
100 %attr(640,root,root) %ghost /var/log/acpid
101 %{_mandir}/man8/acpid.8*