@@ -51,7 +51,7 @@ do_tools_perf_jvmti?=false
do_tools_perf_python?=false
# Indep tools packages may only be built for the main linux source package
-ifeq ($(src_pkg_name),linux)
+ifeq ($(DEB_SOURCE),linux)
do_tools_common = true
do_tools_host = true
endif
@@ -59,7 +59,7 @@ endif
# The linux-source package may only be built for the linux source package
# We need to explicitly turn this off here to override any (incorrect)
# statement in any of the above included makefile snippets
-ifneq ($(src_pkg_name),linux)
+ifneq ($(DEB_SOURCE),linux)
do_source_package = false
endif
@@ -168,7 +168,7 @@ include $(DROOT)/rules.d/3-binary-indep.mk
include $(DROOT)/rules.d/4-checks.mk
control_files := $(DEBIAN)/control.stub.in
-ifeq ($(src_pkg_name),linux)
+ifeq ($(DEB_SOURCE),linux)
control_files += debian/control.d/linux-libc-dev.stub
control_files += debian/control.d/linux-tools-common.stub
control_files += debian/control.d/linux-cloud-tools-common.stub
@@ -193,22 +193,22 @@ $(DEBIAN)/control.stub: \
for i in $(control_files); do \
cat $$i; \
echo ""; \
- done | sed -e 's/PKGVER/$(release)/g' \
+ done | sed -e 's/PKGVER/$(DEB_VERSION_UPSTREAM)/g' \
-e 's/ABINUM/$(abinum)/g' \
- -e 's/SRCPKGNAME/$(src_pkg_name)/g' \
+ -e 's/SRCPKGNAME/$(DEB_SOURCE)/g' \
-e 's/=HUMAN=/$(human_arch)/g' \
- -e 's/=SERIES=/$(series)/g' \
+ -e 's/=SERIES=/$(DEB_DISTRIBUTION)/g' \
-e 's|\(^Maintainer:.*\)|\1\nXSC-Ubuntu-Compatible-Signing: $(UBUNTU_COMPATIBLE_SIGNING)|g' \
-e 's/\(^Build-Depends:$$\)/\1\n$(GCC_BUILD_DEPENDS)/g' \
> $(DEBIAN)/control.stub;
flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.*))";\
for i in $$flavours; do \
$(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" | \
- sed -e 's/PKGVER/$(release)/g' \
+ sed -e 's/PKGVER/$(DEB_VERSION_UPSTREAM)/g' \
-e 's/ABINUM/$(abinum)/g' \
- -e 's/SRCPKGNAME/$(src_pkg_name)/g' \
+ -e 's/SRCPKGNAME/$(DEB_SOURCE)/g' \
-e 's/=HUMAN=/$(human_arch)/g' \
- -e 's/=SERIES=/$(series)/g' \
+ -e 's/=SERIES=/$(DEB_DISTRIBUTION)/g' \
>> $(DEBIAN)/control.stub; \
done
@@ -3,21 +3,24 @@ comma = ,
empty :=
space := $(empty) $(empty)
-#
+# We cannot include /usr/share/dpkg/pkg-info.mk because the variables defined
+# here depend on the $(DEBIAN) directory, which can vary between kernels.
+# Instead, this file will define the same variables but using the $(DEBIAN)
+# variable to use the correct files.
+
# The source package name will be the first token from $(DEBIAN)/changelog
-#
-src_pkg_name := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S source)
+DEB_SOURCE := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S source)
# Get the series
-series := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S distribution | sed -e 's/-\(security\|updates\|proposed\)$$//')
+DEB_DISTRIBUTION := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S distribution | sed -e 's/-\(security\|updates\|proposed\)$$//')
# Get some version info
-version := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S version)
-revision ?= $(lastword $(subst -,$(space),$(version)))
-release := $(patsubst %-$(revision),%,$(version))
+DEB_VERSION := $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -S version)
+DEB_REVISION ?= $(lastword $(subst -,$(space),$(DEB_VERSION)))
+DEB_VERSION_UPSTREAM := $(patsubst %-$(DEB_REVISION),%,$(DEB_VERSION))
-prev_fullver ?= $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -o1 -c1 -S version)
-prev_revision := $(lastword 0.0 $(subst -,$(space),$(prev_fullver)))
+DEB_VERSION_PREV ?= $(shell dpkg-parsechangelog -l$(DEBIAN)/changelog -o1 -c1 -S version)
+DEB_REVISION_PREV := $(lastword 0.0 $(subst -,$(space),$(DEB_VERSION_PREV)))
# Get upstream version info
upstream_version := $(shell sed -n 's/^VERSION = \(.*\)$$/\1/p' Makefile)
@@ -58,11 +61,11 @@ ifeq ($(filter $(DEB_BUILD_OPTIONS),noautodbgsym),noautodbgsym)
do_dbgsym_package = false
endif
-abinum := $(firstword $(subst .,$(space),$(revision)))
+abinum := $(firstword $(subst .,$(space),$(DEB_REVISION)))
prev_abinum := $(firstword $(subst .,$(space),$(prev_revision)))
-abi_release := $(release)-$(abinum)
+abi_release := $(DEB_VERSION_UPSTREAM)-$(abinum)
-uploadnum := $(patsubst $(abinum).%,%,$(revision))
+uploadnum := $(patsubst $(abinum).%,%,$(DEB_REVISION))
ifneq ($(do_full_build),false)
uploadnum := $(uploadnum)-Ubuntu
endif
@@ -107,9 +110,9 @@ mods_pkg_name=linux-modules-$(abi_release)
mods_extra_pkg_name=linux-modules-extra-$(abi_release)
bldinfo_pkg_name=linux-buildinfo-$(abi_release)
hdrs_pkg_name=linux-headers-$(abi_release)
-rust_pkg_name=$(src_pkg_name)-lib-rust-$(abi_release)
-indep_hdrs_pkg_name=$(src_pkg_name)-headers-$(abi_release)
-indep_lib_rust_pkg_name=$(src_pkg_name)-lib-rust-$(abi_release)
+rust_pkg_name=$(DEB_SOURCE)-lib-rust-$(abi_release)
+indep_hdrs_pkg_name=$(DEB_SOURCE)-headers-$(abi_release)
+indep_lib_rust_pkg_name=$(DEB_SOURCE)-lib-rust-$(abi_release)
#
# Similarly with the linux-source package, you need not build it as a developer. Its
@@ -135,10 +138,10 @@ ifneq ($(wildcard $(CURDIR)/tools),)
else
do_tools?=false
endif
-tools_pkg_name=$(src_pkg_name)-tools-$(abi_release)
+tools_pkg_name=$(DEB_SOURCE)-tools-$(abi_release)
tools_common_pkg_name=linux-tools-common
tools_flavour_pkg_name=linux-tools-$(abi_release)
-cloud_pkg_name=$(src_pkg_name)-cloud-tools-$(abi_release)
+cloud_pkg_name=$(DEB_SOURCE)-cloud-tools-$(abi_release)
cloud_common_pkg_name=linux-cloud-tools-common
cloud_flavour_pkg_name=linux-cloud-tools-$(abi_release)
hosttools_pkg_name=linux-tools-host
@@ -154,7 +157,7 @@ do_dtbs=false
# ZSTD compressed kernel modules
do_zstd_ko=true
-ifeq ($(series),jammy)
+ifeq ($(DEB_DISTRIBUTION),jammy)
do_zstd_ko=
endif
@@ -34,10 +34,10 @@ $(configs-targets):
.PHONY: printenv
printenv:
@dh_testdir
- @echo "src_pkg_name = $(src_pkg_name)"
- @echo "series = $(series)"
- @echo "release = $(release)"
- @echo "revision = $(revision)"
+ @echo "DEB_SOURCE = $(DEB_SOURCE)"
+ @echo "DEB_DISTRIBUTION = $(DEB_DISTRIBUTION)"
+ @echo "DEB_VERSION_UPSTREAM = $(DEB_VERSION_UPSTREAM)"
+ @echo "DEB_REVISION = $(DEB_REVISION)"
@echo "uploadnum = $(uploadnum)"
@echo "prev_revision = $(prev_revision)"
@echo "abinum = $(abinum)"
@@ -96,7 +96,7 @@ printenv:
.PHONY: printchanges
printchanges:
@baseCommit=$$(git log --pretty=format:'%H %s' | \
- gawk '/UBUNTU: '".*Ubuntu-.*`echo $(prev_fullver) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \
+ gawk '/UBUNTU: '".*Ubuntu-.*`echo $(DEB_VERSION_PREV) | sed 's/+/\\\\+/'`"'(~.*)?$$/ { print $$1; exit }'); \
if [ -z "$$baseCommit" ]; then \
echo "WARNING: couldn't find a commit for the previous version. Using the lastest one." >&2; \
baseCommit=$$(git log --pretty=format:'%H %s' | \
@@ -121,7 +121,7 @@ autoreconstruct:
.PHONY: finalchecks
finalchecks: debian/control
- $(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(prev_fullver)" $(do_skip_checks)
+ $(DROOT)/scripts/checks/final-checks "$(DEBIAN)" "$(DEB_VERSION_PREV)" $(do_skip_checks)
.PHONY: compileselftests
compileselftests:
@@ -17,7 +17,7 @@ $(stampdir)/stamp-prepare-tree-%: debian/scripts/fix-filenames
install -d $(builddir)/build-$*
touch $(builddir)/build-$*/ubuntu-build
python3 debian/scripts/misc/annotations --export --arch $(arch) --flavour $(target_flavour) > $(builddir)/build-$*/.config
- sed -i 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(release)-$(revision)-$* $(raw_kernelversion)"/' $(builddir)/build-$*/.config
+ sed -i 's/.*CONFIG_VERSION_SIGNATURE.*/CONFIG_VERSION_SIGNATURE="Ubuntu $(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)-$* $(raw_kernelversion)"/' $(builddir)/build-$*/.config
find $(builddir)/build-$* -name "*.ko" | xargs rm -f
$(kmake) O=$(builddir)/build-$* $(conc_level) rustavailable || true
$(kmake) O=$(builddir)/build-$* $(conc_level) olddefconfig
@@ -87,7 +87,7 @@ $(stampdir)/stamp-install-%: pkgdir_ex = $(CURDIR)/debian/$(mods_extra_pkg_name)
$(stampdir)/stamp-install-%: pkgdir_bldinfo = $(CURDIR)/debian/$(bldinfo_pkg_name)-$*
$(stampdir)/stamp-install-%: bindoc = $(pkgdir)/usr/share/doc/$(bin_pkg_name)-$*
$(stampdir)/stamp-install-%: dbgpkgdir = $(CURDIR)/debian/$(bin_pkg_name)-$*-dbgsym
-$(stampdir)/stamp-install-%: signingv = $(CURDIR)/debian/$(bin_pkg_name)-signing/$(release)-$(revision)
+$(stampdir)/stamp-install-%: signingv = $(CURDIR)/debian/$(bin_pkg_name)-signing/$(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)
$(stampdir)/stamp-install-%: toolspkgdir = $(CURDIR)/debian/$(tools_flavour_pkg_name)-$*
$(stampdir)/stamp-install-%: cloudpkgdir = $(CURDIR)/debian/$(cloud_flavour_pkg_name)-$*
$(stampdir)/stamp-install-%: basepkg = $(hdrs_pkg_name)
@@ -164,21 +164,21 @@ endif
# - blacklist all watchdog drivers (LP:1432837)
#
install -d $(pkgdir)/lib/modprobe.d
- echo "# Kernel supplied blacklist for $(src_pkg_name) $(abi_release)-$* $(arch)" \
- >$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf
+ echo "# Kernel supplied blacklist for $(DEB_SOURCE) $(abi_release)-$* $(arch)" \
+ >$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf
for conf in $(arch)-$* $(arch) common.conf; do \
if [ -f $(DEBIAN)/modprobe.d/$$conf ]; then \
echo "# modprobe.d/$$conf"; \
cat $(DEBIAN)/modprobe.d/$$conf; \
fi; \
- done >>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf
+ done >>$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf
echo "# Autogenerated watchdog blacklist" \
- >>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf
+ >>$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf
ls -1 $(pkgdir)/lib/modules/$(abi_release)-$*/kernel/drivers/watchdog/ | \
grep -v '^bcm2835_wdt$$' | \
sed -e 's/^/blacklist /' -e 's/.ko$$//' | \
sort -u \
- >>$(pkgdir)/lib/modprobe.d/blacklist_$(src_pkg_name)_$(abi_release)-$*.conf
+ >>$(pkgdir)/lib/modprobe.d/blacklist_$(DEB_SOURCE)_$(abi_release)-$*.conf
ifeq ($(do_extras_package),true)
#
@@ -309,7 +309,7 @@ endif
# At the end of the package prep, call the tests
DPKG_ARCH="$(arch)" KERN_ARCH="$(build_arch)" FLAVOUR="$*" \
- VERSION="$(abi_release)" REVISION="$(revision)" \
+ VERSION="$(abi_release)" REVISION="$(DEB_REVISION)" \
PREV_REVISION="$(prev_revision)" ABI_NUM="$(abinum)" \
PREV_ABI_NUM="$(prev_abinum)" BUILD_DIR="$(builddir)/build-$*" \
INSTALL_DIR="$(pkgdir)" SOURCE_DIR="$(CURDIR)" \
@@ -341,42 +341,42 @@ ifeq ($(do_linux_tools),true)
# Create the linux-tools tool links
install -d $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
ifeq ($(do_tools_usbip),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/usbip $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/usbipd $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/usbip $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/usbipd $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
ifeq ($(do_tools_acpidbg),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/acpidbg $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/acpidbg $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
ifeq ($(do_tools_cpupower),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/cpupower $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/cpupower $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
ifeq ($(do_tools_rtla),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/rtla $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/rtla $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
ifeq ($(do_tools_perf),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/perf $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/perf $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
ifeq ($(do_tools_perf_jvmti),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/libperf-jvmti.so $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/libperf-jvmti.so $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
endif
ifeq ($(do_tools_bpftool),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/bpftool $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/bpftool $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
ifeq ($(do_tools_x86),true)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/x86_energy_perf_policy $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/turbostat $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/x86_energy_perf_policy $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/turbostat $(toolspkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
endif
ifeq ($(do_cloud_tools),true)
ifeq ($(do_tools_hyperv),true)
# Create the linux-hyperv tool links
install -d $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_kvp_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_vss_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/hv_kvp_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/hv_vss_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
ifneq ($(build_arch),arm64)
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/hv_fcopy_uio_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/hv_fcopy_uio_daemon $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
- $(LN) ../../$(src_pkg_name)-tools-$(abi_release)/lsvmbus $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
+ $(LN) ../../$(DEB_SOURCE)-tools-$(abi_release)/lsvmbus $(cloudpkgdir)/usr/lib/linux-tools/$(abi_release)-$*
endif
endif
@@ -602,8 +602,8 @@ ifeq ($(do_dbgsym_package),true)
# package from being mirrored. It is instead, through some
# archive admin hackery, copied to http://ddebs.ubuntu.com.
#
- mv ../$(dbgpkg)_$(release)-$(revision)_$(arch).deb \
- ../$(dbgpkg)_$(release)-$(revision)_$(arch).ddeb
+ mv ../$(dbgpkg)_$(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)_$(arch).deb \
+ ../$(dbgpkg)_$(DEB_VERSION_UPSTREAM)-$(DEB_REVISION)_$(arch).ddeb
$(lockme) sed -i '/^$(dbgpkg)_/s/\.deb /.ddeb /' debian/files
# Now, the package wont get into the archive, but it will get put
# into the debug system.
@@ -696,35 +696,35 @@ install-perarch: $(stampdir)/stamp-build-perarch
# Add the tools.
ifeq ($(do_linux_tools),true)
install -d $(toolspkgdir)/usr/lib
- install -d $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ install -d $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
ifeq ($(do_tools_usbip),true)
install -m755 $(addprefix $(builddirpa)/tools/usb/usbip/bin/sbin/, usbip usbipd) \
- $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
ifeq ($(do_tools_acpidbg),true)
install -m755 $(builddirpa)/tools/power/acpi/acpidbg \
- $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
ifeq ($(do_tools_cpupower),true)
install -m755 $(builddirpa)/tools/power/cpupower/cpupower \
- $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
ifeq ($(do_tools_rtla),true)
install -m755 $(builddirpa)/tools/tracing/rtla/rtla-static \
- $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)/rtla
+ $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)/rtla
endif
ifeq ($(do_tools_perf),true)
- install -m755 $(builddirpa)/tools/perf/perf $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ install -m755 $(builddirpa)/tools/perf/perf $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
ifeq ($(do_tools_perf_jvmti),true)
- install -m755 $(builddirpa)/tools/perf/libperf-jvmti.so $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ install -m755 $(builddirpa)/tools/perf/libperf-jvmti.so $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
ifeq ($(do_tools_perf_python),true)
- install -d $(toolspkgdir)/usr/lib/python3/dist-packages/$(src_pkg_name)-tools-$(abi_release)
- install -m755 $(builddirpa)/tools/perf/python/perf*.so $(toolspkgdir)/usr/lib/python3/dist-packages/$(src_pkg_name)-tools-$(abi_release)
+ install -d $(toolspkgdir)/usr/lib/python3/dist-packages/$(DEB_SOURCE)-tools-$(abi_release)
+ install -m755 $(builddirpa)/tools/perf/python/perf*.so $(toolspkgdir)/usr/lib/python3/dist-packages/$(DEB_SOURCE)-tools-$(abi_release)
endif
endif
ifeq ($(do_tools_bpftool),true)
- install -m755 $(builddirpa)/tools/bpf/bpftool/bpftool $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ install -m755 $(builddirpa)/tools/bpf/bpftool/bpftool $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
ifeq ($(do_tools_bpftool),true)
install -d -m755 $(CURDIR)/debian/linux-bpf-dev/usr/include/$(DEB_HOST_MULTIARCH)/linux/
@@ -733,18 +733,18 @@ endif
ifeq ($(do_tools_x86),true)
install -m755 \
$(addprefix $(builddirpa)/tools/power/x86/, x86_energy_perf_policy/x86_energy_perf_policy turbostat/turbostat) \
- $(toolspkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ $(toolspkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
endif
ifeq ($(do_cloud_tools),true)
ifeq ($(do_tools_hyperv),true)
install -d $(cloudpkgdir)/usr/lib
- install -d $(cloudpkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ install -d $(cloudpkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
install -m755 $(addprefix $(builddirpa)/tools/hv/, hv_kvp_daemon hv_vss_daemon lsvmbus) \
- $(cloudpkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ $(cloudpkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
ifneq ($(build_arch),arm64)
install -m755 $(addprefix $(builddirpa)/tools/hv/, hv_fcopy_uio_daemon) \
- $(cloudpkgdir)/usr/lib/$(src_pkg_name)-tools-$(abi_release)
+ $(cloudpkgdir)/usr/lib/$(DEB_SOURCE)-tools-$(abi_release)
endif
endif
endif
@@ -31,7 +31,7 @@ ifeq ($(do_flavour_header_package),true)
endif
$(stamp)
-srcpkg = linux-source-$(release)
+srcpkg = linux-source-$(DEB_VERSION_UPSTREAM)
srcdir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)
balldir = $(CURDIR)/debian/$(srcpkg)/usr/src/$(srcpkg)/$(srcpkg)
install-source: $(stampdir)/stamp-prepare-indep
To use the same naming scheme as the Debian packages that include /usr/share/dpkg/pkg-info.mk, rename variables to use the DEB_ prefix. Some variables already exist and have been reused (DEB_SOURCE, DEB_VERSION, DEB_VERSION_UPSTREAM, DEB_DISTRIBUTION) and some other variables have been introduced by following the naming scheme while not being defined in pkg-info.mk (DEB_VERSION_PREV, DEB_REVISION, DEB_REVISION_PREV). Signed-off-by: Agathe Porte <agathe.porte@canonical.com> --- debian/rules | 18 ++++---- debian/rules.d/0-common-vars.mk | 39 ++++++++-------- debian/rules.d/1-maintainer.mk | 12 ++--- debian/rules.d/2-binary-arch.mk | 76 ++++++++++++++++---------------- debian/rules.d/3-binary-indep.mk | 2 +- 5 files changed, 75 insertions(+), 72 deletions(-)