]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
spec: Introduce with_dmidecode
authorAndrea Bolognani <abologna@redhat.com>
Mon, 5 Oct 2020 16:43:32 +0000 (18:43 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 9 Oct 2020 12:34:23 +0000 (14:34 +0200)
To keep things maintainable, we want to have architecture handling
all in one spot instead of sprinkling %ifarch conditionals all over
the place.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
libvirt.spec.in

index 1862edd2f824b5ac31c92d4681fbdb1f08ea1d99..1fc05054b597b68f59e74d7e8180404d4f144829 100644 (file)
@@ -94,6 +94,7 @@
 %define with_libssh2          0
 %define with_wireshark        0
 %define with_libssh           0
+%define with_dmidecode        0
 
 # Finally set the OS / architecture specific special cases
 
     %endif
 %endif
 
+%ifarch %{ix86} x86_64
+    %define with_dmidecode 0%{!?_without_dmidecode:1}
+%endif
+
 # Force QEMU to run as non-root
 %define qemu_user  qemu
 %define qemu_group  qemu
@@ -435,7 +440,7 @@ Requires: iproute-tc
 %endif
 
 Requires: polkit >= 0.112
-%ifarch %{ix86} x86_64
+%if %{with_dmidecode}
 # For virConnectGetSysinfo
 Requires: dmidecode
 %endif