From 63e31aa9a37569aa28600c370571edc6dea621fc Mon Sep 17 00:00:00 2001 From: Fabiano FidĂȘncio Date: Mar 23 2020 09:03:27 +0000 Subject: Define and use have_go_rpm_macros In order to keep things more organised, let's define and use have_go_rpm_macros instead of just checking for fedora. By doing this we follow what's already done by libvirt. Signed-off-by: Fabiano FidĂȘncio --- diff --git a/kata-osbuilder.spec b/kata-osbuilder.spec index c0a0778..8e4e62d 100644 --- a/kata-osbuilder.spec +++ b/kata-osbuilder.spec @@ -1,3 +1,9 @@ +%if (0%{?fedora} && 0%{?fedora >= 31}) + %define have_go_rpm_macros 1 +%else + %define have_go_rpm_macros 0 +%endif + %global with_debug 0 %if 0%{?with_debug} @@ -57,7 +63,7 @@ Patch03: osbuilder-0002-rootfs-Don-t-overwrite-init-if-it-already-exists.patch BuildRequires: gcc BuildRequires: git -%if 0%{?fedora} +%if 0%{?have_go_rpm_macros} BuildRequires: go-rpm-macros %else BuildRequires: compiler(go-compiler)