]> git.pld-linux.org Git - packages/acpid.git/blob - acpid.spec
- added logrotate rule,
[packages/acpid.git] / acpid.spec
1 Summary:        ACPI Event Daemon
2 Summary(pl):    Demon zdarzeñ ACPI
3 Name:           acpid
4 Version:        1.0.0
5 Release:        4
6 License:        GPL
7 Group:          Daemons
8 Group(de):      Server
9 Group(pl):      Serwery
10 Source0:        ftp://ftp.sourceforge.net/pub/sourceforge/acpid/%{name}-%{version}.tar.gz
11 Source1:        %{name}.init
12 Source2:        %{name}.sysconfig
13 Source3:        %{name}.logrotate
14 URL:            http://acpid.sourceforge.net/
15 Obsoletes:      apmd
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %description
19 acpid is a daemon that dispatches ACPI events to user-space programs.
20
21 %description -l pl
22 acpid to demon przekazuj±cy zdarzenia ACPI do programów w user-space.
23
24 %prep
25 %setup -q
26
27 %build
28 %{__make}
29
30 %install
31 rm -rf $RPM_BUILD_ROOT
32 install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \
33         $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8}
34
35 install acpid $RPM_BUILD_ROOT/%{_sbindir}
36 install acpid.8 $RPM_BUILD_ROOT/%{_mandir}/man8
37 install samples/sample.conf $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events
38 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid
39 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid
40 install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid
41
42 > $RPM_BUILD_ROOT/var/log/acpid
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %post
48 /sbin/chkconfig --add acpid
49 if [ -f /var/lock/subsys/acpid ]; then
50         /etc/rc.d/init.d/acpid restart >&2
51 else
52         echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon."
53 fi
54
55 %preun
56 if [ "$1" = "0" ]; then
57         if [ -f /var/lock/subsys/acpid ]; then
58                 /etc/rc.d/init.d/acpid stop>&2
59         fi
60         /sbin/chkconfig --del acpid
61 fi
62
63 %files
64 %defattr(644,root,root,755)
65 %dir %{_sysconfdir}/acpi
66 %dir %{_sysconfdir}/acpi/events
67 %dir %{_sysconfdir}/acpi/actions
68 %attr(640,root,root) /etc/logrotate.d/acpid
69 %attr(754,root,root) /etc/rc.d/init.d/acpid
70 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/acpid
71 %config(noreplace,missingok) %verify(not size mtime md5) %{_sysconfdir}/acpi/events/sample.conf
72 %attr(755,root,root) %{_sbindir}/acpid
73 %attr(640,root,root) %ghost /var/log/acpid
74 %{_mandir}/man8/acpid.8.gz
This page took 0.054019 seconds and 3 git commands to generate.