]>
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 |
dd33996b | 9 | Release: 6 |
2c9e8004 | 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 |
2c9e8004 JB |
25 | Provides: acpi-daemon |
26 | Obsoletes: acpi-daemon | |
27 | Obsoletes: apm-daemon | |
28 | ExclusiveArch: %{ix86} %{x8664} ia64 | |
e5bcd3b5 | 29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
11f5d39c AM |
30 | |
31 | %description | |
32 | acpid is a daemon that dispatches ACPI events to user-space programs. | |
33 | ||
6d2541a2 | 34 | %description -l pl.UTF-8 |
dd33996b MM |
35 | acpid to demon przekazujący zdarzenia ACPI do programów w |
36 | user-space. | |
37 | ||
38 | %package policy | |
39 | Summary: ACPID policy files | |
40 | Summary: Pliki z polityką dla ACPID | |
41 | Group: Daemons | |
42 | Requires: %{name} > 1.0.6-5 | |
43 | ||
44 | %description policy | |
45 | This package contains scripts and configuration files which allow | |
46 | ACPID to take action on incoming acpi events (eg. to run a script that | |
47 | suspends the system when the power button is pressed). | |
48 | ||
49 | Notice: on most current systems you DO NOT want this package | |
50 | installed, since there are other software packages responsible for | |
51 | handling acpi events (one example being gnome-power-manager) and | |
52 | having ACPID also respond will lead to problems. In such cases ACPID | |
53 | should only act as a message broker. | |
54 | ||
55 | %description policy -l pl.UTF-8 | |
56 | Ta paczka zawiera skrypty i pliki konfiguracyjne, które umożliwiają | |
57 | demonowi ACPI wykonywanie operacji na podstawie przychodzących | |
58 | zdarzeń acpi (np. uruchomienie skryptu usypiającego system, gdy | |
59 | użytkownik naciśnie przycisk zasilania). | |
60 | ||
61 | Uwaga: na większości obecnych systemów NIE CHCESZ instalować tej | |
62 | paczki, gdyż za reagowanie na zdarzenia acpi są w nich | |
63 | odpowiedzialne inne programy (np. gnome-power-manager), więc ACPID by | |
64 | tylko przeszkadzał. W takich przypadkach demon ACPI powinien | |
65 | działać wyłącznie jako dyspozytor wiadomości. | |
11f5d39c AM |
66 | |
67 | %prep | |
e5bcd3b5 | 68 | %setup -q |
11f5d39c AM |
69 | |
70 | %build | |
8e1353a0 ER |
71 | %{__make} \ |
72 | CC="%{__cc}" \ | |
97461ed1 | 73 | CFLAGS='-Wall -Werror %{rpmcflags} -D_GNU_SOURCE $(DEFS)' |
11f5d39c AM |
74 | |
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
eacfdd80 | 77 | install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \ |
3f9b4ca2 | 78 | $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8} |
cae99dca | 79 | |
c892e1e5 PG |
80 | install acpid $RPM_BUILD_ROOT%{_sbindir} |
81 | install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
f9bd0618 | 82 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid |
83 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid | |
e36c8a9a | 84 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid |
393dd5c2 | 85 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/button.conf |
86 | install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/battery.conf | |
87 | install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/button.sh | |
88 | install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/battery.sh | |
63950c22 | 89 | |
3f9b4ca2 | 90 | > $RPM_BUILD_ROOT/var/log/acpid |
11f5d39c | 91 | |
e5bcd3b5 JB |
92 | %clean |
93 | rm -rf $RPM_BUILD_ROOT | |
11f5d39c AM |
94 | |
95 | %post | |
e5bcd3b5 | 96 | /sbin/chkconfig --add acpid |
d26689d0 | 97 | %service acpid restart "ACPI daemon" |
11f5d39c AM |
98 | |
99 | %preun | |
11f5d39c | 100 | if [ "$1" = "0" ]; then |
d26689d0 | 101 | %service acpid stop |
11f5d39c AM |
102 | /sbin/chkconfig --del acpid |
103 | fi | |
e5bcd3b5 | 104 | |
11b701eb ER |
105 | %triggerpostun -- %{name} < 1.0.4-4 |
106 | %banner -e %{name} << 'EOF' | |
393dd5c2 | 107 | Default configuration files have changed. |
1916c5da | 108 | You might want to review your configuration in /etc/acpi |
393dd5c2 | 109 | EOF |
63950c22 | 110 | |
e5bcd3b5 JB |
111 | %files |
112 | %defattr(644,root,root,755) | |
893b1623 | 113 | %doc Changelog README TODO |
2c9e8004 | 114 | %attr(755,root,root) %{_sbindir}/acpid |
e5bcd3b5 JB |
115 | %dir %{_sysconfdir}/acpi |
116 | %dir %{_sysconfdir}/acpi/events | |
117 | %dir %{_sysconfdir}/acpi/actions | |
893b1623 | 118 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/acpid |
f9bd0618 | 119 | %attr(754,root,root) /etc/rc.d/init.d/acpid |
893b1623 | 120 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/acpid |
3f9b4ca2 | 121 | %attr(640,root,root) %ghost /var/log/acpid |
3c10aae9 | 122 | %{_mandir}/man8/acpid.8* |
dd33996b MM |
123 | |
124 | %files policy | |
125 | %defattr(644,root,root,755) | |
126 | %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/*.conf | |
127 | %attr(754,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/actions/*.sh |