X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=acpid.spec;h=f1ed822cbe36bc8b6fb55b142a21eea5c80c3900;hb=6b3346ce00f13f7ed3695ddd3986342c62cf5960;hp=0ebdddb2d8911681d335155c2ab93ae041e83221;hpb=35139c83bd16f579df2d16c8a56619d6d5e4e7fb;p=packages%2Facpid.git diff --git a/acpid.spec b/acpid.spec index 0ebdddb..f1ed822 100644 --- a/acpid.spec +++ b/acpid.spec @@ -1,17 +1,26 @@ +# TODO: +# - better event handling in power.sh +# - better default configuration of events in /etc/acpi +# - processor and fan module support (?) Summary: ACPI Event Daemon Summary(pl): Demon zdarzeƱ ACPI Name: acpid -Version: 1.0.0 -Release: 3 -License: GPL +Version: 1.0.3 +Release: 2 +License: GPL v2 Group: Daemons -Group(de): Server -Group(pl): Serwery -Source0: ftp://ftp.sourceforge.net/pub/sourceforge/acpid/%{name}-%{version}.tar.gz +Source0: http://dl.sourceforge.net/acpid/%{name}-%{version}.tar.gz +# Source0-md5: 8513c19d0f14ff396ea73caaea7f2ef8 Source1: %{name}.init Source2: %{name}.sysconfig +Source3: %{name}.logrotate +Source4: %{name}.halt_on_power_button.conf +Patch0: %{name}-powersh_fix.patch URL: http://acpid.sourceforge.net/ +PreReq: rc-scripts +Requires(post,preun): /sbin/chkconfig Obsoletes: apmd +Obsoletes: poweracpid BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -22,23 +31,28 @@ acpid to demon przekazuj %prep %setup -q +%patch0 -p1 %build %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},/var/log,/etc/{rc.d/init.d,sysconfig}} -install -d $RPM_BUILD_ROOT/{%{_sbindir},%{_mandir}/man8} +install -d $RPM_BUILD_ROOT{%{_sysconfdir}/{logrotate.d,rc.d/init.d,sysconfig},/var/log} \ + $RPM_BUILD_ROOT{%{_sysconfdir}/acpi/{events,actions},%{_sbindir},%{_mandir}/man8} -install acpid $RPM_BUILD_ROOT/%{_sbindir} -install acpid.8 $RPM_BUILD_ROOT/%{_mandir}/man8 +install acpid $RPM_BUILD_ROOT%{_sbindir} +install acpid.8 $RPM_BUILD_ROOT%{_mandir}/man8 install samples/sample.conf $RPM_BUILD_ROOT%{_sysconfdir}/acpi/events install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/acpid install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/acpid +install %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/acpid +install samples/acpi_handler.sh $RPM_BUILD_ROOT%{_sbindir}/power.sh +# Or create halt_on_power_button subpackage +install %{SOURCE4} $RPM_BUILD_ROOT/etc/acpi/events -touch $RPM_BUILD_ROOT/var/log/acpid + +> $RPM_BUILD_ROOT/var/log/acpid %clean rm -rf $RPM_BUILD_ROOT @@ -48,7 +62,7 @@ rm -rf $RPM_BUILD_ROOT if [ -f /var/lock/subsys/acpid ]; then /etc/rc.d/init.d/acpid restart >&2 else - echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon." + echo "Run \"/etc/rc.d/init.d/acpid start\" to start ACPI daemon." fi %preun @@ -59,14 +73,27 @@ if [ "$1" = "0" ]; then /sbin/chkconfig --del acpid fi +# %post halt_on_power_button +# if [ -f /var/lock/subsys/acpid ]; then +# /etc/rc.d/init.d/acpid reload +# fi + +# %postun halt_on_power_button +# if [ -f /var/lock/subsys/acpid ]; then +# /etc/rc.d/init.d/acpid reload +# fi + %files %defattr(644,root,root,755) +%doc Changelog README TODO %dir %{_sysconfdir}/acpi %dir %{_sysconfdir}/acpi/events %dir %{_sysconfdir}/acpi/actions -%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/acpi/events/sample.conf -%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/acpid -%attr(640,root,root) %ghost /var/log/acpid -%attr(755,root,root) %{_sbindir}/acpid +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/acpid %attr(754,root,root) /etc/rc.d/init.d/acpid -%{_mandir}/man8/acpid.8.gz +%config(noreplace) %verify(not size mtime md5) /etc/sysconfig/acpid +%config(noreplace,missingok) %verify(not size mtime md5) %{_sysconfdir}/acpi/events/*.conf +%attr(755,root,root) %{_sbindir}/acpid +%attr(755,root,root) %{_sbindir}/power.sh +%attr(640,root,root) %ghost /var/log/acpid +%{_mandir}/man8/acpid.8*