[pm-utils] Fix dependencies based on whether power.d/* are shipped (#769071).

Ville Skyttä scop at fedoraproject.org
Tue Dec 20 16:48:59 UTC 2011


commit 17344fbafe1248cfd40e741b17f9558dca382261
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Dec 20 18:48:52 2011 +0200

    Fix dependencies based on whether power.d/* are shipped (#769071).

 pm-utils.spec |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/pm-utils.spec b/pm-utils.spec
index 8571636..3ba4601 100644
--- a/pm-utils.spec
+++ b/pm-utils.spec
@@ -1,15 +1,23 @@
+# power.d stuff breaks more than it helps, so drop it for now
+%bcond_with power_d
 %global quirkdbver 20100619
 Name: pm-utils
 Summary: Power management utilities and scripts for Fedora
 License: GPLv2
 Version: 1.4.1
-Release: 15%{?dist}
+Release: 16%{?dist}
 Group: System Environment/Base
 URL: http://pm-utils.freedesktop.org
 %ifnarch s390 s390x
 Requires: kbd
-# for hd apm settings
+%if %{with power_d}
+# power.d/disable_wol
+Requires: ethtool
+# power.d/harddisk
 Requires: hdparm
+# power.d/wireless
+Requires: wireless-tools
+%endif
 %endif
 BuildRequires: xmlto
 
@@ -69,8 +77,9 @@ install -D -m 0755 %{SOURCE23} $RPM_BUILD_ROOT%{_sbindir}/pm-utils-bugreport-inf
 # Install quirks
 cp -r video-quirks $RPM_BUILD_ROOT%{_libdir}/pm-utils
 
-# These break more than they helps, so drop them for now
+%if ! %{with power_d}
 rm $RPM_BUILD_ROOT%{_libdir}/pm-utils/power.d/*
+%endif
 
 # Install extra documentation
 cp -p COPYING AUTHORS ChangeLog $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
@@ -89,6 +98,9 @@ rm -rf %{_localstatedir}/run/pm-utils/{pm-suspend,pm-powersave}/storage/*
 %{_libdir}/pm-utils/functions
 %{_libdir}/pm-utils/module.d/*
 %{_libdir}/pm-utils/pm-functions
+%if %{with power_d}
+%{_libdir}/pm-utils/power.d/*
+%endif
 %{_libdir}/pm-utils/sleep.d/*
 %{_bindir}/on_ac_power
 %{_bindir}/pm-is-supported
@@ -111,6 +123,9 @@ rm -rf %{_localstatedir}/run/pm-utils/{pm-suspend,pm-powersave}/storage/*
 %{_libdir}/pkgconfig/pm-utils.pc
 
 %changelog
+* Tue Dec 20 2011 Ville Skyttä <ville.skytta at iki.fi> - 1.4.1-16
+- Fix dependencies based on whether power.d/* are shipped (#769071).
+
 * Thu Dec 15 2011 Robin Lee <cheeselee at fedoraproject.org> - 1.4.1-15
 - Rearranged the included documentation
 


More information about the scm-commits mailing list