From acd6bbf177c4de1646d0f3c434d9d65f9b8bbbe8 Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Tue, 30 May 2023 12:24:04 +0200 Subject: [PATCH] UBUNTU: [Packaging] introduce do_lib_rust and enable it only on generic amd64 Introduce the new variable do_lib_rust to enable or disable the packaging of linux-lib-rust and enable it only on the generic amd64 kernel. This allows to avoid building any kind of Rust artifact in other kernels, except for the generic one and only on amd64. Signed-off-by: Andrea Righi --- debian.master/rules.d/amd64.mk | 1 + debian/rules.d/1-maintainer.mk | 1 + debian/rules.d/2-binary-arch.mk | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian.master/rules.d/amd64.mk b/debian.master/rules.d/amd64.mk index d0384f0227a4..afed3e50966b 100644 --- a/debian.master/rules.d/amd64.mk +++ b/debian.master/rules.d/amd64.mk @@ -21,3 +21,4 @@ do_extras_package = true do_tools_common = true do_tools_acpidbg = true do_odm_drivers = true +do_lib_rust = true diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk index 23df25f6c05c..839e93a15371 100644 --- a/debian/rules.d/1-maintainer.mk +++ b/debian/rules.d/1-maintainer.mk @@ -82,6 +82,7 @@ printenv: @echo "do_common_headers_indep = $(do_common_headers_indep)" @echo "do_full_source = $(do_full_source)" @echo "do_odm_drivers = $(do_odm_drivers)" + @echo "do_lib_rust = $(do_lib_rust)" @echo "do_tools = $(do_tools)" @echo "do_tools_common = $(do_tools_common)" @echo "do_any_tools = $(do_any_tools)" diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 0f9af38a1a39..c720cc88041c 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -132,7 +132,7 @@ $(stampdir)/stamp-install-%: $(stampdir)/stamp-build-% $(stampdir)/stamp-install dh_prep -p$(bin_pkg_name)-$* dh_prep -p$(mods_pkg_name)-$* dh_prep -p$(hdrs_pkg_name)-$* -ifeq ($(build_arch),x86) +ifeq ($(do_lib_rust),true) dh_prep -p$(rust_pkg_name)-$* endif $(foreach _m,$(all_standalone_dkms_modules), \ @@ -651,7 +651,7 @@ endif $(call dh_all,$(pkgbldinfo)) $(call dh_all,$(pkghdr)) -ifeq ($(build_arch),x86) +ifeq ($(do_lib_rust),true) $(call dh_all,$(pkgrust)) endif