]> git.pld-linux.org Git - packages/acpid.git/blob - acpid.spec
- rel 5
[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):    Demon zdarzeñ ACPI
7 Name:           acpid
8 Version:        1.0.4
9 Release:        5
10 License:        GPL v2
11 Group:          Daemons
12 Source0:        http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz
13 # Source0-md5:  3aff94e92186e99ed5fd6dcee2db7c74
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 Patch0:         %{name}-gcc4.patch
22 URL:            http://acpid.sourceforge.net/
23 BuildRequires:  rpmbuild(macros) >= 1.268
24 Requires(post,preun):   /sbin/chkconfig
25 Requires:       rc-scripts
26 Obsoletes:      apmd
27 Obsoletes:      poweracpid
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 acpid is a daemon that dispatches ACPI events to user-space programs.
32
33 %description -l pl
34 acpid to demon przekazuj±cy zdarzenia ACPI do programów w user-space.
35
36 %prep
37 %setup -q
38 %patch0 -p1
39
40 %build
41 %{__make}
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.068204 seconds and 4 git commands to generate.