From: William Douglas Date: Tue, 26 Jun 2012 19:03:26 +0000 (-0700) Subject: fix systemd unit install path X-Git-Tag: 2.0_alpha^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2F2.0alpha;p=external%2Facpid.git fix systemd unit install path Change-Id: I7d83bf79afa8b8141d27f53b931339d23fd766cf Signed-off-by: William Douglas --- diff --git a/packaging/acpid.changes b/packaging/acpid.changes index 3e3f0ad..7aa8510 100644 --- a/packaging/acpid.changes +++ b/packaging/acpid.changes @@ -1,2 +1,14 @@ -* Thu Jun 21 2012 William Douglas - 2.0.14 -- Remove chmod \ No newline at end of file +* Tue Jun 26 2012 William Douglas ca3c303 +- fix systemd unit install path + +* Thu Jun 21 2012 William Douglas 305e215 +- Remove chmod use in build + +* Tue May 29 2012 Ryan Ware bd6b5e9 +- Add default Smack manifest for acpid.spec + +* Fri May 18 2012 Zhang Qiang 97875af +- Initial code release + +* Fri Apr 27 2012 eunmee moon 1320dfb +- Initial empty repository diff --git a/packaging/acpid.spec b/packaging/acpid.spec index 571ddef..6a8de5a 100644 --- a/packaging/acpid.spec +++ b/packaging/acpid.spec @@ -22,6 +22,10 @@ Source1001: packaging/acpid.manifest Patch1: acpid-2.0.9-makefile.patch # << gbp-patch-tags # auto-added by gbp +Requires(post): /usr/bin/systemctl +Requires(postun): /usr/bin/systemctl +Requires(preun): /usr/bin/systemctl + Url: http://tedfelix.com/linux/acpid-netlink.html ExclusiveArch: ia64 x86_64 %{ix86} @@ -58,7 +62,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/acpi/battery.d mkdir -p %{buildroot}%{_sysconfdir}/acpi/start.d mkdir -p %{buildroot}%{_sysconfdir}/pm/sleep.d mkdir -p %{buildroot}%{_localstatedir}/lib/acpi-support -mkdir -p %{buildroot}/%{_lib}/systemd/system +mkdir -p %{buildroot}/%{_libdir}/systemd/system install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/acpi/events/videoconf install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/acpi/events/powerconf install -m 755 %{SOURCE4} %{buildroot}%{_sysconfdir}/acpi/actions/power.sh @@ -69,11 +73,26 @@ install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/acpi/events/batteryconf install -m 644 %{SOURCE9} %{buildroot}%{_sysconfdir}/acpi/events/acconf install -m 755 %{SOURCE13} %{buildroot}%{_sbindir}/acpid-start-script install -m 755 %{SOURCE14} %{buildroot}%{_sysconfdir}/acpi/actions/start.sh -install -D -m 644 %{SOURCE15} %{buildroot}/%{_lib}/systemd/system/acpid.service +install -D -m 644 %{SOURCE15} %{buildroot}/%{_libdir}/systemd/system/acpid.service install -D -m 644 %{SOURCE16} %{buildroot}%{_sysconfdir}/sysconfig/acpid -mkdir -p %{buildroot}/%{_lib}/systemd/system/sysinit.target.wants -ln -s ../acpid.service %{buildroot}/%{_lib}/systemd/system/sysinit.target.wants/acpid.service +mkdir -p %{buildroot}/%{_libdir}/systemd/system/sysinit.target.wants +ln -s ../acpid.service %{buildroot}/%{_libdir}/systemd/system/sysinit.target.wants/acpid.service + + +%preun +if [ $1 == 0 ]; then + systemctl stop acpid.service +fi + +%post +systemctl daemon-reload +if [ $1 == 1 ]; then + systemctl restart acpid.service +fi + +%postun +systemctl daemon-reload %files @@ -84,8 +103,8 @@ ln -s ../acpid.service %{buildroot}/%{_lib}/systemd/system/sysinit.target.wants/ %dir %{_sysconfdir}/acpi/ac.d %dir %{_sysconfdir}/acpi/battery.d %dir %{_localstatedir}/lib/acpi-support -/%{_lib}/systemd/system/acpid.service -/%{_lib}/systemd/system/sysinit.target.wants/acpid.service +%{_libdir}/systemd/system/acpid.service +%{_libdir}/systemd/system/sysinit.target.wants/acpid.service %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/videoconf %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/acpi/events/powerconf %config(noreplace) %attr(0755,root,root) %{_sysconfdir}/acpi/actions/power.sh