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>
%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
%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
# 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}
%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