kbuild: deb-pkg: improve the usability of source package
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 15 Feb 2023 01:20:33 +0000 (10:20 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sun, 26 Feb 2023 06:23:30 +0000 (15:23 +0900)
commit3ab18a625ce42163da91ee4096460218d11bed36
tree5a25fc4aa5f88b640c186e1053defdf7f58c63a2
parentc5bf2efb058d841bf8993b9a9b4522abda804d39
kbuild: deb-pkg: improve the usability of source package

Improve the source package support in case the dpkg-buildpackage is
directly used to build binary packages.

For cross-compiling, you can set CROSS_COMPILE via the environment
variable, but it is better to set it automatically - set it to
${DEB_HOST_GNU_TYPE}- if we are cross-compiling but not from the top
Makefile.

The generated source package may be carried to a different build
environment, which may have a different compiler installed.
Run olddefconfig first to set new CONFIG options to their default
values without prompting.

Take KERNELRELEASE and KBUILD_BUILD_VERSION from the version field of
debian/changelog in case it is updated afterwards.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/package/deb-build-option [new file with mode: 0755]
scripts/package/mkdebian