aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package')
-rw-r--r--scripts/package/builddeb28
1 files changed, 27 insertions, 1 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ffe24194b763..5fc1e6f71838 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -76,15 +76,17 @@ else
76fi 76fi
77tmpdir="$objtree/debian/tmp" 77tmpdir="$objtree/debian/tmp"
78fwdir="$objtree/debian/fwtmp" 78fwdir="$objtree/debian/fwtmp"
79hdrdir="$objtree/debian/hdrtmp"
79packagename=linux-image-$version 80packagename=linux-image-$version
80fwpackagename=linux-firmware-image 81fwpackagename=linux-firmware-image
82hdrpackagename=linux-headers-$version
81 83
82if [ "$ARCH" = "um" ] ; then 84if [ "$ARCH" = "um" ] ; then
83 packagename=user-mode-linux-$version 85 packagename=user-mode-linux-$version
84fi 86fi
85 87
86# Setup the directory structure 88# Setup the directory structure
87rm -rf "$tmpdir" "$fwdir" 89rm -rf "$tmpdir" "$fwdir" "$hdrdir"
88mkdir -m 755 -p "$tmpdir/DEBIAN" 90mkdir -m 755 -p "$tmpdir/DEBIAN"
89mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" 91mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
90mkdir -m 755 -p "$fwdir/DEBIAN" 92mkdir -m 755 -p "$fwdir/DEBIAN"
@@ -226,6 +228,30 @@ EOF
226 228
227fi 229fi
228 230
231# Build header package
232find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
233find arch/x86/include include scripts -type f >> /tmp/files$$
234(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
235destdir=$hdrdir/usr/src/linux-headers-$version
236mkdir -p "$destdir" "$hdrdir/DEBIAN" "$hdrdir/usr/share/doc/$hdrpackagename"
237tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
238(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
239rm -f /tmp/files$$ /tmp/objfiles$$
240arch=$(dpkg --print-architecture)
241
242cat <<EOF >> debian/control
243
244Package: $hdrpackagename
245Provides: linux-headers, linux-headers-2.6
246Architecture: $arch
247Description: Linux kernel headers for $KERNELRELEASE on $arch
248 This package provides kernel header files for $KERNELRELEASE on $arch
249 .
250 This is useful for people who need to build external modules
251EOF
252
253create_package "$hdrpackagename" "$hdrdir"
254
229# Do we have firmware? Move it out of the way and build it into a package. 255# Do we have firmware? Move it out of the way and build it into a package.
230if [ -e "$tmpdir/lib/firmware" ]; then 256if [ -e "$tmpdir/lib/firmware" ]; then
231 mv "$tmpdir/lib/firmware" "$fwdir/lib/" 257 mv "$tmpdir/lib/firmware" "$fwdir/lib/"