From b98334becd4c52e98e433e17118f9bf0e27903cc Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sat, 30 Jul 2022 01:15:20 +0200 Subject: [PATCH] Add %%golang_arches_future macro This introduces a new %%golang_arches_future macro so packagers can replace ExclusvieArch: %%go_arches or %%golang_arches with it to exclude their package from %ix86. --- go-rpm-macros.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go-rpm-macros.spec b/go-rpm-macros.spec index f43d89b..1217f8f 100644 --- a/go-rpm-macros.spec +++ b/go-rpm-macros.spec @@ -7,7 +7,8 @@ Version: 3.0.15 %global _docdir_fmt %{name} # Master definition that will be written to macro files -%global golang_arches %{ix86} x86_64 %{arm} aarch64 ppc64le s390x +%global golang_arches_future x86_64 %{arm} aarch64 ppc64le s390x +%global golang_arches %{ix86} %{golang_arches_future} %global gccgo_arches %{mips} %if 0%{?rhel} >= 9 %global golang_arches x86_64 aarch64 ppc64le s390x @@ -85,8 +86,8 @@ This package contains documented rpm spec templates showcasing how to use the macros provided by go-rpm-macros to create Go packages. %prep -%forgeautosetup -%writevars -f rpm/macros.d/macros.go-srpm golang_arches gccgo_arches gopath +%forgeautosetup -p1 +%writevars -f rpm/macros.d/macros.go-srpm golang_arches golang_arches_future gccgo_arches gopath for template in templates/rpm/*\.spec ; do target=$(echo "${template}" | sed "s|^\(.*\)\.spec$|\1-bare.spec|g") grep -v '^#' "${template}" > "${target}"