[packages/rpm-pld-macros] extract %_kernel_arch macro; 2.030
atler
atler at pld-linux.org
Wed Dec 20 20:46:39 CET 2023
commit 3372942145cc638be2a7b8d92bf1b3fed3e19f3b
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Dec 20 20:28:23 2023 +0100
extract %_kernel_arch macro; 2.030
macros.kernel | 22 +++++++++++++---------
rpm-pld-macros.spec | 4 ++--
2 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index 18ea9c7..110e686 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define rpm_macros_rev 2.029
+%define rpm_macros_rev 2.030
%define find_lang_rev 1.42
# split into individual X_prov_ver if there is a reason to desync
%define prov_ver 4.15
@@ -6,7 +6,7 @@ Summary: PLD Linux RPM macros
Summary(pl.UTF-8): Makra RPM dla Linuksa PLD
Name: rpm-pld-macros
Version: %{rpm_macros_rev}
-Release: 2
+Release: 1
License: GPL v2+
Group: Development/Building
Source0: macros.pld
diff --git a/macros.kernel b/macros.kernel
index 8aa96bb..315db4a 100644
--- a/macros.kernel
+++ b/macros.kernel
@@ -91,6 +91,18 @@ done)
%_host_base_arch %{expand:%%global _host_base_arch %(echo %{_host_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/pentium./i386/;s/amd64/x86_64/;s/ia32e/x86_64/;s/x32/x86_64/;s/sparcv./sparc/;s/arm.*/arm/')}%_host_base_arch
%_target_base_arch %{expand:%%global _target_base_arch %(echo %{_target_cpu} | sed 's/i.86/i386/;s/athlon/i386/;s/pentium./i386/;s/amd64/x86_64/;s/ia32e/x86_64/;s/x32/x86_64/;s/sparcv./sparc/;s/arm.*/arm/')}%_target_base_arch
+%_kernel_arch \\\
+%ifarch aarch64\
+arm64\
+%endif\
+%ifarch ppc ppc64\
+powerpc\\\
+%endif\
+%ifnarch aarch64 ppc ppc64\
+%{_target_base_arch}\\\
+%endif\
+%{nil}
+
# Compression used for %__spec_install_post_compress_modules
# Supported values:
# - "gzip -9nf" (module-init-tools and kmod)
@@ -164,15 +176,7 @@ done)
ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux- \\\
%endif \\\
%else \\\
- %ifarch aarch64 \\\
- ARCH=arm64 \\\
- %endif \\\
- %ifarch ppc ppc64 \\\
- ARCH=powerpc \\\
- %endif \\\
- %ifnarch aarch64 ppc ppc64 \\\
- ARCH=%{_target_base_arch} \\\
- %endif \\\
+ ARCH=%_kernel_arch \\\
CC="%{__cc}" \\\
%endif \
%define MakeOpts HOSTCC="%{__cc}" SYSSRC=%{_kernelsrcdir} SYSOUT=$PWD/o \\\\\\\
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/3372942145cc638be2a7b8d92bf1b3fed3e19f3b
More information about the pld-cvs-commit
mailing list