[nbdkit] - libguestfs is available only on selected arches

Dan Horák sharkcz at fedoraproject.org
Thu Mar 6 09:55:52 UTC 2014


commit 89736ecc17f95d75a03d5386f27ab365ef258439
Author: Dan Horák <dan at danny.cz>
Date:   Thu Mar 6 10:55:42 2014 +0100

    - libguestfs is available only on selected arches

 nbdkit.spec |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/nbdkit.spec b/nbdkit.spec
index 501bb07..9e3fa18 100644
--- a/nbdkit.spec
+++ b/nbdkit.spec
@@ -1,5 +1,9 @@
 %global _hardened_build 1
 
+%ifarch %{arm} %{ix86} x86_64 ppc %{power64}
+%global have_libguestfs 1
+%endif
+
 Name:           nbdkit
 Version:        1.1.6
 Release:        3%{?dist}
@@ -16,7 +20,9 @@ Patch2: 0002-tests-Test-the-nbdkit-command-line-more-thoroughly.patch
 Patch3: autotools.patch
 
 BuildRequires:  /usr/bin/pod2man
+%if 0%{?have_libguestfs}
 BuildRequires:  libguestfs-devel
+%endif
 BuildRequires:  libvirt-devel
 BuildRequires:  xz-devel
 BuildRequires:  zlib-devel
@@ -69,6 +75,7 @@ Requires:       %{name}%{?_isa} = %{version}-%{release}
 This package is a file serving plugin for %{name}.
 
 
+%if 0%{?have_libguestfs}
 %package plugin-guestfs
 Summary:        libguestfs plugin for %{name}
 License:        BSD
@@ -78,6 +85,7 @@ Requires:       %{name}%{?_isa} = %{version}-%{release}
 
 %description plugin-guestfs
 This package is a libguestfs plugin for %{name}.
+%endif
 
 
 %package plugin-gzip
@@ -179,9 +187,9 @@ find $RPM_BUILD_ROOT -name '*.la' -delete
 # libguestfs 1.20 in Fedora 18 doesn't support NBD client protocol, so
 # the tests cannot be run.
 %if 0%{?fedora} >= 19
-# Unlikely that libguestfs will work on ARM, so don't try running the
+# Unlikely that libguestfs will work on ARM and PPC, so don't try running the
 # tests there.
-%ifnarch %{arm}
+%ifnarch %{arm} ppc %{power64}
 make check
 %endif
 %endif
@@ -207,10 +215,12 @@ make check
 %{_mandir}/man1/nbdkit-file-plugin.1*
 
 
+%if 0%{?have_libguestfs}
 %files plugin-guestfs
 %doc LICENSE README
 %{_libdir}/%{name}/plugins/nbdkit-guestfs-plugin.so
 %{_mandir}/man1/nbdkit-guestfs-plugin.1*
+%endif
 
 
 %files plugin-gzip
@@ -254,6 +264,9 @@ make check
 
 
 %changelog
+* Thu Mar 06 2014 Dan Horák <dan[at]danny.cz> - 1.1.6-4
+- libguestfs is available only on selected arches
+
 * Fri Feb 21 2014 Richard W.M. Jones <rjones at redhat.com> - 1.1.6-3
 - Backport some upstream patches, fixing a minor bug and adding more tests.
 - Enable the tests since kernel bug is fixed.


More information about the scm-commits mailing list