kbuild: rpm-pkg: record ARCH option in spec file
authorMasahiro Yamada <masahiroy@kernel.org>
Sat, 22 Jul 2023 04:47:52 +0000 (13:47 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 24 Jul 2023 15:59:32 +0000 (00:59 +0900)
commita06d9ef897d59f719102e2890abd8a2b91e29a60
treedd0d4f32d9e52da374a6ae0fefa6c908a1ab9658
parentfe809b8271be87628e37bced68f22d0f8379dad3
kbuild: rpm-pkg: record ARCH option in spec file

Currently, we rely on the top Makefile defining ARCH option when we
run 'make rpm-pkg' or 'make binrpm-pkg'.

It does not apply when we run 'make srcrpm-pkg', and separately run
'rpmbuild' for the generated SRPM. This is a problem for cross-build.

Just like the Debian package, save the value of ARCH in the spec file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/mkspec