]> xenbits.xensource.com Git - libvirt.git/commitdiff
spec: Move definition of supported_platform variable
authorAndrea Bolognani <abologna@redhat.com>
Tue, 11 May 2021 15:16:36 +0000 (17:16 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Wed, 12 May 2021 08:29:43 +0000 (10:29 +0200)
It's only used in one place, and it's nicer to keep the error
message close to the check that causes it to be emitted.

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

index 013c7742a25ac2e6c3100d3765423ebd3115f0ee..5766af2255cc46b6adb097eb7978c0ad91f30dfd 100644 (file)
@@ -6,12 +6,6 @@
 %define min_rhel 8
 %define min_fedora 33
 
-%if 0%{?fedora} >= %{min_fedora} || 0%{?rhel} >= %{min_rhel}
-    %define supported_platform 1
-%else
-    %define supported_platform 0
-%endif
-
 %define arches_qemu_kvm         %{ix86} x86_64 %{power64} %{arm} aarch64 s390x
 %if 0%{?rhel}
     %define arches_qemu_kvm     x86_64 aarch64 s390x
@@ -929,6 +923,12 @@ Libvirt plugin for NSS for translating domain names into IP addresses.
 %autosetup -S git_am
 
 %build
+%if 0%{?fedora} >= %{min_fedora} || 0%{?rhel} >= %{min_rhel}
+    %define supported_platform 1
+%else
+    %define supported_platform 0
+%endif
+
 %if ! %{supported_platform}
 echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
 exit 1
index 84b8998f747dfe378cb3b12d966c59ca9c7fc3d0..3068607908e4dde3755f6f7eea47e48c978c37cd 100644 (file)
@@ -5,12 +5,6 @@
 # or versions, but no effort will be made to ensure that going forward.
 %define min_fedora 33
 
-%if 0%{?fedora} && 0%{?fedora} >= %{min_fedora}
-    %define supported_platform 1
-%else
-    %define supported_platform 0
-%endif
-
 Name:           mingw-libvirt
 Version:        @VERSION@
 Release:        1%{?dist}
@@ -95,6 +89,12 @@ MinGW Windows libvirt virtualization library.
 %setup -q -n libvirt-%{version}
 
 %build
+%if 0%{?fedora} && 0%{?fedora} >= %{min_fedora}
+    %define supported_platform 1
+%else
+    %define supported_platform 0
+%endif
+
 %if ! %{supported_platform}
 echo "This RPM requires Fedora >= %{min_fedora}"
 exit 1