aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.(none)>2005-07-14 16:24:00 -0400
committerSam Ravnborg <sam@mars.(none)>2005-07-14 16:24:00 -0400
commit687c3dac59f1746a1cf877eb52e93046a4998e03 (patch)
treea5c25447b4bea67871ef46cb43b25939e230a557 /scripts/package
parentd80e22460968ec7986c82fd7d207ebe3de59e03d (diff)
uml: Make deb-pkg build target build a Debian-style user-mode-linux package
From: Ryan Anderson <ryan@michonline.com> Make the deb-pkg build target understand the "um" arch and set up the package and directory structure to match a mainline-Debian style user-mode-linux package. This is primarily so that it stops matching, exactly, the naming convention used by normal, non-UML kernels generated by this command. Installing "linux-2.6.11" and "linux-2.6.11", where one is a UML kernel doesn't do the right thing. This fixes that. Signed-off-by: Ryan Anderson <ryan@michonline.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/package')
-rw-r--r--scripts/package/builddeb32
1 files changed, 26 insertions, 6 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index c279b6310f02..bec1a10174ec 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -14,18 +14,38 @@ set -e
14# Some variables and settings used throughout the script 14# Some variables and settings used throughout the script
15version=$KERNELRELEASE 15version=$KERNELRELEASE
16tmpdir="$objtree/debian/tmp" 16tmpdir="$objtree/debian/tmp"
17packagename=linux-$version
18
19if [ "$ARCH" == "um" ] ; then
20 packagename=user-mode-linux-$version
21fi
17 22
18# Setup the directory structure 23# Setup the directory structure
19rm -rf "$tmpdir" 24rm -rf "$tmpdir"
20mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" 25mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
26if [ "$ARCH" == "um" ] ; then
27 mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
28fi
21 29
22# Build and install the kernel 30# Build and install the kernel
23cp System.map "$tmpdir/boot/System.map-$version" 31if [ "$ARCH" == "um" ] ; then
24cp .config "$tmpdir/boot/config-$version" 32 $MAKE linux
25cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" 33 cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
34 cp .config "$tmpdir/usr/share/doc/$packagename/config"
35 gzip "$tmpdir/usr/share/doc/$packagename/config"
36 cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
37else
38 cp System.map "$tmpdir/boot/System.map-$version"
39 cp .config "$tmpdir/boot/config-$version"
40 cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
41fi
26 42
27if grep -q '^CONFIG_MODULES=y' .config ; then 43if grep -q '^CONFIG_MODULES=y' .config ; then
28 INSTALL_MOD_PATH="$tmpdir" make modules_install 44 INSTALL_MOD_PATH="$tmpdir" make modules_install
45 if [ "$ARCH" == "um" ] ; then
46 mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
47 rmdir "$tmpdir/lib/modules/$version"
48 fi
29fi 49fi
30 50
31# Install the maintainer scripts 51# Install the maintainer scripts
@@ -60,11 +80,11 @@ Priority: optional
60Maintainer: $name 80Maintainer: $name
61Standards-Version: 3.6.1 81Standards-Version: 3.6.1
62 82
63Package: linux-$version 83Package: $packagename
64Architecture: any 84Architecture: any
65Description: Linux kernel, version $version 85Description: Linux kernel, version $packagename
66 This package contains the Linux kernel, modules and corresponding other 86 This package contains the Linux kernel, modules and corresponding other
67 files version $version. 87 files version $packagename
68EOF 88EOF
69 89
70# Fix some ownership and permissions 90# Fix some ownership and permissions