]> git.pld-linux.org Git - packages/acpid.git/blob - acpid.spec
- obsoletes poweracpid
[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.2
9 Release:        2.5
10 License:        GPL v2
11 Group:          Daemons
12 # Source0-md5:  15884aaf0b82717954f9366b5c00808b
13 Source0:        http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz
14 Source1:        %{name}.init
15 Source2:        %{name}.sysconfig
16 Source3:        %{name}.logrotate
17 Patch0:         %{name}-powersh_fix.patch
18 URL:            http://acpid.sourceforge.net/
19 PreReq:         rc-scripts
20 Requires(post,preun):   /sbin/chkconfig
21 Obsoletes:      apmd
22 Obsoletes:      poweracpid
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 acpid is a daemon that dispatches ACPI events to user-space programs.
27
28 %description -l pl
29 acpid to demon przekazuj±cy zdarzenia ACPI do programów w user-space.
30
31 %prep
32 %setup -q
33 #%patch0 -p1
34
35 %build
36 %{__make}
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \
41         $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8}
42
43 install acpid $RPM_BUILD_ROOT%{_sbindir}
44 install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8
45 install samples/sample.conf $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
46 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
47 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
48 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid
49 install samples/acpi_handler.sh $RPM_BUILD_ROOT%{_sbindir}/power.sh
50
51 > $RPM_BUILD_ROOT/var/log/acpid
52
53 %clean
54 rm -rf $RPM_BUILD_ROOT
55
56 %post
57 /sbin/chkconfig --add acpid
58 if [ -f /var/lock/subsys/acpid ]; then
59         /etc/rc.d/init.d/acpid restart >&2
60 else
61         echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon."
62 fi
63
64 %preun
65 if [ "$1" = "0" ]; then
66         if [ -f /var/lock/subsys/acpid ]; then
67                 /etc/rc.d/init.d/acpid stop>&2
68         fi
69         /sbin/chkconfig --del acpid
70 fi
71
72 %files
73 %defattr(644,root,root,755)
74 %doc Changelog README TODO debian/README.debian
75 %dir %{_sysconfdir}/acpi
76 %dir %{_sysconfdir}/acpi/events
77 %dir %{_sysconfdir}/acpi/actions
78 %attr(640,root,root) /etc/logrotate.d/acpid
79 %attr(754,root,root) /etc/rc.d/init.d/acpid
80 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/acpid
81 %config(noreplace,missingok) %verify(not size mtime md5) %{_sysconfdir}/acpi/events/sample.conf
82 %attr(755,root,root) %{_sbindir}/acpid
83 %attr(755,root,root) %{_sbindir}/power.sh
84 %attr(640,root,root) %ghost /var/log/acpid
85 %{_mandir}/man8/acpid.8*
This page took 0.08817 seconds and 4 git commands to generate.