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.
This commit is contained in:
Maxwell G 2022-07-30 01:15:20 +02:00
parent cbb9f295fd
commit b98334becd
No known key found for this signature in database
GPG Key ID: F79E4E25E8C661F8

View File

@ -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}"