summaryrefslogtreecommitdiff
path: root/scripts/package/mkdebian
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2023-03-13 05:07:30 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2023-03-15 15:15:07 +0900
commit36862e14e31611f9786622db366327209a7aede7 (patch)
treebcc9678dd5ba408b1b20b85f01461054ccd542d0 /scripts/package/mkdebian
parentb611daae5efc64e817171a54021d3b334cc1bc41 (diff)
kbuild: deb-pkg: use dh_listpackages to know enabled packages
Use dh_listpackages to get a list of all binary packages. With this, debian/control lists which binary packages will be produced. Previously, ARCH=um listed linux-libc-dev in debian/control, but it was not generated because each of mkdebian and builddeb independently maintained the if-conditionals. Another motivation is to allow scripts/package/builddeb to get the package name (linux-image-*, etc.) dynamically from debian/control. This will also allow the BuildProfile to control the generation of the binary packages. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/package/mkdebian')
-rwxr-xr-xscripts/package/mkdebian7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
index 31b050368cd0..e80a661a79ee 100755
--- a/scripts/package/mkdebian
+++ b/scripts/package/mkdebian
@@ -192,7 +192,7 @@ Section: kernel
Priority: optional
Maintainer: $maintainer
Rules-Requires-Root: no
-Build-Depends: bc, rsync, kmod, cpio, bison, flex $extra_build_depends
+Build-Depends: bc, debhelper, rsync, kmod, cpio, bison, flex $extra_build_depends
Homepage: https://www.kernel.org/
Package: $packagename-$version
@@ -200,6 +200,10 @@ Architecture: $debarch
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
files, version: $version.
+EOF
+
+if [ "${SRCARCH}" != um ]; then
+cat <<EOF >> debian/control
Package: linux-libc-dev
Section: devel
@@ -222,6 +226,7 @@ Description: Linux kernel headers for $version on $debarch
This is useful for people who need to build external modules
EOF
fi
+fi
if is_enabled CONFIG_DEBUG_INFO; then
cat <<EOF >> debian/control