fi
tmpdir="$objtree/debian/tmp"
fwdir="$objtree/debian/fwtmp"
-hdrdir="$objtree/debian/hdrtmp"
-headerdir="$objtree/debian/headertmp"
+kernel_headers_dir="$objtree/debian/hdrtmp"
+libc_headers_dir="$objtree/debian/headertmp"
packagename=linux-image-$version
fwpackagename=linux-firmware-image
-hdrpackagename=linux-headers-$version
-headerpackagename=linux-libc-dev
+kernel_headers_packagename=linux-headers-$version
+libc_headers_packagename=linux-libc-dev
if [ "$ARCH" = "um" ] ; then
packagename=user-mode-linux-$version
fi
# Setup the directory structure
-rm -rf "$tmpdir" "$fwdir" "$hdrdir" "$headerdir"
+rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir"
mkdir -m 755 -p "$tmpdir/DEBIAN"
mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
mkdir -m 755 -p "$fwdir/DEBIAN"
mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
-mkdir -m 755 -p "$headerdir/DEBIAN"
-mkdir -p "$headerdir/usr/share/doc/$headerpackagename"
+mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
+mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
+mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
+mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
if [ "$ARCH" = "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
fi
fi
make headers_check
-make headers_install INSTALL_HDR_PATH="$headerdir/usr"
+make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
# Install the maintainer scripts
# Note: hook scripts under /etc/kernel are also executed by official Debian
find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
find arch/x86/include include scripts -type f >> /tmp/files$$
(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
-destdir=$hdrdir/usr/src/linux-headers-$version
-mkdir -p "$destdir" "$hdrdir/DEBIAN" "$hdrdir/usr/share/doc/$hdrpackagename"
+destdir=$kernel_headers_dir/usr/src/linux-headers-$version
+mkdir -p "$destdir"
tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
rm -f /tmp/files$$ /tmp/objfiles$$
cat <<EOF >> debian/control
-Package: $hdrpackagename
+Package: $kernel_headers_packagename
Provides: linux-headers, linux-headers-2.6
Architecture: $arch
Description: Linux kernel headers for $KERNELRELEASE on $arch
This is useful for people who need to build external modules
EOF
-create_package "$hdrpackagename" "$hdrdir"
+create_package "$kernel_headers_packagename" "$kernel_headers_dir"
# Do we have firmware? Move it out of the way and build it into a package.
if [ -e "$tmpdir/lib/firmware" ]; then
cat <<EOF >> debian/control
-Package: $headerpackagename
+Package: $libc_headers_packagename
Section: devel
Provides: linux-kernel-headers
Architecture: any
are used by the installed headers for GNU glibc and other system libraries.
EOF
-create_package "$headerpackagename" "$headerdir"
+create_package "$libc_headers_packagename" "$libc_headers_dir"
create_package "$packagename" "$tmpdir"
exit 0