diff options
author | Andrea Bolognani <abologna@redhat.com> | 2021-05-11 17:16:36 +0200 |
---|---|---|
committer | Andrea Bolognani <abologna@redhat.com> | 2021-05-12 10:29:43 +0200 |
commit | e8cdabc868b6acd5c1c840b0a1c95b8884550844 (patch) | |
tree | 9124138164923b3010e92073f14cd214c6ed96c2 /libvirt.spec.in | |
parent | 62e5dc56d9559f22fba1239384b27dd2a845d2e3 (diff) | |
download | libvirt-e8cdabc868b6acd5c1c840b0a1c95b8884550844.tar.gz |
spec: Move definition of supported_platform variable
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>
Diffstat (limited to 'libvirt.spec.in')
-rw-r--r-- | libvirt.spec.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libvirt.spec.in b/libvirt.spec.in index 013c7742a2..5766af2255 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -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 |