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