diff mbox

deb-pkg: Make deb-pkg generate a seperate linux-libc-dev deb

Message ID 1257373849-25557-1-git-send-email-max@stro.at (mailing list archive)
State New, archived
Headers show

Commit Message

maximilian attems Nov. 4, 2009, 10:30 p.m. UTC
None
diff mbox

Patch

diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8b357b0..fbd1994 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -38,17 +38,20 @@  else
 fi
 tmpdir="$objtree/debian/tmp"
 fwdir="$objtree/debian/fwtmp"
+headerdir="$objtree/debian/headertmp"
 packagename=linux-image-$version
 fwpackagename=linux-firmware-image
+headerpackagename=linux-libc-dev
 
 if [ "$ARCH" = "um" ] ; then
 	packagename=user-mode-linux-$version
 fi
 
 # Setup the directory structure
-rm -rf "$tmpdir" "$fwdir"
+rm -rf "$tmpdir" "$fwdir" "$headerdir"
 mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
 mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
+mkdir -p "$headerdir/DEBIAN" "$headerdir/usr" "$headerdir/usr/share/doc/$headerpackagename"
 if [ "$ARCH" = "um" ] ; then
 	mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
 fi
@@ -77,6 +80,9 @@  if grep -q '^CONFIG_MODULES=y' .config ; then
 	fi
 fi
 
+make headers_check
+make headers_install INSTALL_HDR_PATH="$headerdir/usr" 
+
 # Install the maintainer scripts
 # Note: hook scripts under /etc/kernel are also executed by official Debian
 # kernel packages, as well as kernel packages built using make-kpkg
@@ -198,6 +204,18 @@  EOF
 	create_package "$fwpackagename" "$fwdir"
 fi
 
+cat <<EOF >> debian/control
+
+Package: $headerpackagename
+Section: devel
+Provides: linux-kernel-headers
+Architecture: any
+Description: Linux support headers for userspace development
+ This package provides userspaces headers from the Linux kernel.  These headers
+ are used by the installed headers for GNU glibc and other system libraries.
+EOF
+
+create_package "$headerpackagename" "$headerdir"
 create_package "$packagename" "$tmpdir"
 
 exit 0