]> git.pld-linux.org Git - packages/acpid.git/blob - acpid.spec
- up to 1.0.10, fixes CVE-2009-0798
[packages/acpid.git] / acpid.spec
1 Summary:        ACPI Event Daemon
2 Summary(pl.UTF-8):      Demon zdarzeń ACPI
3 Name:           acpid
4 Version:        1.0.10
5 Release:        1
6 License:        GPL v2+
7 Group:          Daemons
8 Source0:        http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz
9 # Source0-md5:  61156ef32015c56dc0f2e3317f4ae09e
10 Source1:        %{name}.init
11 Source2:        %{name}.sysconfig
12 Source3:        %{name}.logrotate
13 Source4:        %{name}.button.conf
14 Source5:        %{name}.battery.conf
15 Source6:        %{name}.button.sh
16 Source7:        %{name}.battery.sh
17 URL:            http://acpid.sourceforge.net/
18 BuildRequires:  rpmbuild(macros) >= 1.268
19 Requires(post,preun):   /sbin/chkconfig
20 Requires:       rc-scripts
21 Provides:       acpi-daemon
22 Obsoletes:      acpi-daemon
23 Obsoletes:      apm-daemon
24 ExclusiveArch:  %{ix86} %{x8664} ia64
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 acpid is a daemon that dispatches ACPI events to user-space programs.
29
30 %description -l pl.UTF-8
31 acpid to demon przekazujący zdarzenia ACPI do programów w user-space.
32
33 %package policy
34 Summary:        ACPID policy files
35 Summary(pl.UTF-8):      Pliki z polityką dla ACPID
36 Group:          Daemons
37 Requires:       %{name} = %{version}-%{release}
38
39 %description policy
40 This package contains scripts and configuration files which allow
41 ACPID to take action on incoming ACPI events (eg. to run a script that
42 suspends the system when the power button is pressed).
43
44 Notice: on most current systems you DO NOT want this package
45 installed, since there are other software packages responsible for
46 handling ACPI events (one example being gnome-power-manager) and
47 having ACPID also respond will lead to problems. In such cases ACPID
48 should only act as a message broker.
49
50 %description policy -l pl.UTF-8
51 Ten pakiet zawiera skrypty i pliki konfiguracyjne, które umożliwiają
52 demonowi ACPI wykonywanie operacji na podstawie przychodzących
53 zdarzeń ACPI (np. uruchomienie skryptu usypiającego system, gdy
54 użytkownik naciśnie przycisk zasilania).
55
56 Uwaga: na większości obecnych systemów NIE NALEŻY instalować tego
57 pakietu, gdyż za reagowanie na zdarzenia ACPI są w nich odpowiedzialne
58 inne programy (np. gnome-power-manager), więc ACPID by tylko
59 przeszkadzał. W takich przypadkach demon ACPI powinien działać
60 wyłącznie jako dyspozytor wiadomości.
61
62 %prep
63 %setup -q
64
65 %build
66 %{__make} \
67         CC="%{__cc}" \
68         CFLAGS='-Wall -Werror %{rpmcflags} -D_GNU_SOURCE $(DEFS)'
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \
73         $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8}
74
75 install acpid $RPM_BUILD_ROOT%{_sbindir}
76 install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8
77 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
78 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
79 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid
80 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/button.conf
81 install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events/battery.conf
82 install %{SOURCE6} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/button.sh
83 install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/acpi/actions/battery.sh
84
85 > $RPM_BUILD_ROOT/var/log/acpid
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 /sbin/chkconfig --add acpid
92 %service acpid restart "ACPI daemon"
93
94 %preun
95 if [ "$1" = "0" ]; then
96         %service acpid stop
97         /sbin/chkconfig --del acpid
98 fi
99
100 %triggerpostun -- %{name} < 1.0.4-4
101 %banner -e %{name} << 'EOF'
102 Default configuration files have changed.
103 You might want to review your configuration in /etc/acpi
104 EOF
105
106 %files
107 %defattr(644,root,root,755)
108 %doc Changelog README TODO
109 %attr(755,root,root) %{_sbindir}/acpid
110 %dir %{_sysconfdir}/acpi
111 %dir %{_sysconfdir}/acpi/events
112 %dir %{_sysconfdir}/acpi/actions
113 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/acpid
114 %attr(754,root,root) /etc/rc.d/init.d/acpid
115 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/acpid
116 %attr(640,root,root) %ghost /var/log/acpid
117 %{_mandir}/man8/acpid.8*
118
119 %files policy
120 %defattr(644,root,root,755)
121 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/*.conf
122 %attr(754,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/actions/*.sh
This page took 0.051293 seconds and 4 git commands to generate.