]>
Commit | Line | Data |
---|---|---|
b4394bdf PG |
1 | # TODO: |
2 | # - better event handling in power.sh | |
3 | # - better default configuration of events in /etc/acpi | |
4 | # - processor and fan module support (?) | |
e5bcd3b5 | 5 | Summary: ACPI Event Daemon |
e0dc1852 | 6 | Summary(pl.UTF-8): Demon zdarzeń ACPI |
e5bcd3b5 | 7 | Name: acpid |
0518141c | 8 | Version: 1.0.6 |
5b43d059 | 9 | Release: 2 |
b4394bdf | 10 | License: GPL v2 |
e5bcd3b5 | 11 | Group: Daemons |
04b9683b | 12 | Source0: http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz |
0518141c | 13 | # Source0-md5: 5c9b705700df51d232be223b6ab6414d |
258a99b0 PG |
14 | Source1: %{name}.init |
15 | Source2: %{name}.sysconfig | |
3f9b4ca2 | 16 | Source3: %{name}.logrotate |
393dd5c2 | 17 | Source4: %{name}.button.conf |
18 | Source5: %{name}.battery.conf | |
19 | Source6: %{name}.button.sh | |
20 | Source7: %{name}.battery.sh | |
e5bcd3b5 | 21 | URL: http://acpid.sourceforge.net/ |
d26689d0 | 22 | BuildRequires: rpmbuild(macros) >= 1.268 |
8c4ef41e | 23 | Requires(post,preun): /sbin/chkconfig |
d26689d0 | 24 | Requires: rc-scripts |
2acf544c | 25 | Obsoletes: poweracpid |
8b190340 | 26 | Conflicts: apmd |
e5bcd3b5 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
11f5d39c AM |
28 | |
29 | %description | |
30 | acpid is a daemon that dispatches ACPI events to user-space programs. | |
31 | ||
6d2541a2 JR |
32 | %description -l pl.UTF-8 |
33 | acpid to demon przekazujący zdarzenia ACPI do programów w user-space. | |
11f5d39c AM |
34 | |
35 | %prep | |
e5bcd3b5 | 36 | %setup -q |
11f5d39c AM |
37 | |
38 | %build | |
8e1353a0 ER |
39 | %{__make} \ |
40 | CC="%{__cc}" \ | |
41 | CFLAGS='-Wall -Werror %{rpmcflags} $(DEFS)' | |
11f5d39c AM |
42 | |
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
eacfdd80 | 45 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \ |
3f9b4ca2 | 46 | $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8} |
cae99dca | 47 | |
c892e1e5 PG |
48 | install acpid $RPM_BUILD_ROOT%{_sbindir} |
49 | install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
f9bd0618 | 50 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid |
51 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid | |
e36c8a9a | 52 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid |
393dd5c2 | 53 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/button.conf |
54 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/battery.conf | |
55 | install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/button.sh | |
56 | install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/battery.sh | |
63950c22 | 57 | |
3f9b4ca2 | 58 | > $RPM_BUILD_ROOT/var/log/acpid |
11f5d39c | 59 | |
e5bcd3b5 JB |
60 | %clean |
61 | rm -rf $RPM_BUILD_ROOT | |
11f5d39c AM |
62 | |
63 | %post | |
e5bcd3b5 | 64 | /sbin/chkconfig --add acpid |
d26689d0 | 65 | %service acpid restart "ACPI daemon" |
11f5d39c AM |
66 | |
67 | %preun | |
11f5d39c | 68 | if [ "$1" = "0" ]; then |
d26689d0 | 69 | %service acpid stop |
11f5d39c AM |
70 | /sbin/chkconfig --del acpid |
71 | fi | |
e5bcd3b5 | 72 | |
393dd5c2 | 73 | %triggerpostun -- %{name} <= 1.0.4-3 |
74 | %banner -e %{name} << EOF | |
75 | Default configuration files have changed. | |
1916c5da | 76 | You might want to review your configuration in /etc/acpi |
393dd5c2 | 77 | EOF |
63950c22 | 78 | |
e5bcd3b5 JB |
79 | %files |
80 | %defattr(644,root,root,755) | |
893b1623 | 81 | %doc Changelog README TODO |
e5bcd3b5 JB |
82 | %dir %{_sysconfdir}/acpi |
83 | %dir %{_sysconfdir}/acpi/events | |
84 | %dir %{_sysconfdir}/acpi/actions | |
893b1623 | 85 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/acpid |
f9bd0618 | 86 | %attr(754,root,root) /etc/rc.d/init.d/acpid |
893b1623 SP |
87 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/acpid |
88 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/*.conf | |
393dd5c2 | 89 | %attr(754,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/actions/*.sh |
3f9b4ca2 TP |
90 | %attr(755,root,root) %{_sbindir}/acpid |
91 | %attr(640,root,root) %ghost /var/log/acpid | |
3c10aae9 | 92 | %{_mandir}/man8/acpid.8* |