]> git.pld-linux.org Git - packages/acpid.git/blob - acpid.spec
- rel 2
[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 Summary:        ACPI Event Daemon
6 Summary(pl.UTF-8):      Demon zdarzeń ACPI
7 Name:           acpid
8 Version:        1.0.6
9 Release:        2
10 License:        GPL v2
11 Group:          Daemons
12 Source0:        http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz
13 # Source0-md5:  5c9b705700df51d232be223b6ab6414d
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 Source3:        %{name}.logrotate
17 Source4:        %{name}.button.conf
18 Source5:        %{name}.battery.conf
19 Source6:        %{name}.button.sh
20 Source7:        %{name}.battery.sh
21 URL:            http://acpid.sourceforge.net/
22 BuildRequires:  rpmbuild(macros) >= 1.268
23 Requires(post,preun):   /sbin/chkconfig
24 Requires:       rc-scripts
25 Obsoletes:      poweracpid
26 Conflicts:      apmd
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 acpid is a daemon that dispatches ACPI events to user-space programs.
31
32 %description -l pl.UTF-8
33 acpid to demon przekazujący zdarzenia ACPI do programów w user-space.
34
35 %prep
36 %setup -q
37
38 %build
39 %{__make} \
40         CC="%{__cc}" \
41         CFLAGS='-Wall -Werror %{rpmcflags} $(DEFS)'
42
43 %install
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \
46         $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8}
47
48 install acpid $RPM_BUILD_ROOT%{_sbindir}
49 install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8
50 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
51 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
52 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid
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
57
58 > $RPM_BUILD_ROOT/var/log/acpid
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %post
64 /sbin/chkconfig --add acpid
65 %service acpid restart "ACPI daemon"
66
67 %preun
68 if [ "$1" = "0" ]; then
69         %service acpid stop
70         /sbin/chkconfig --del acpid
71 fi
72
73 %triggerpostun -- %{name} <= 1.0.4-3
74 %banner -e %{name} << EOF
75 Default configuration files have changed.
76 You might want to review your configuration in /etc/acpi
77 EOF
78
79 %files
80 %defattr(644,root,root,755)
81 %doc Changelog README TODO
82 %dir %{_sysconfdir}/acpi
83 %dir %{_sysconfdir}/acpi/events
84 %dir %{_sysconfdir}/acpi/actions
85 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/acpid
86 %attr(754,root,root) /etc/rc.d/init.d/acpid
87 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/acpid
88 %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/events/*.conf
89 %attr(754,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/acpi/actions/*.sh
90 %attr(755,root,root) %{_sbindir}/acpid
91 %attr(640,root,root) %ghost /var/log/acpid
92 %{_mandir}/man8/acpid.8*
This page took 0.039253 seconds and 4 git commands to generate.