diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/package/builddeb | 32 |
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 |
15 | version=$KERNELRELEASE | 15 | version=$KERNELRELEASE |
16 | tmpdir="$objtree/debian/tmp" | 16 | tmpdir="$objtree/debian/tmp" |
17 | packagename=linux-$version | ||
18 | |||
19 | if [ "$ARCH" == "um" ] ; then | ||
20 | packagename=user-mode-linux-$version | ||
21 | fi | ||
17 | 22 | ||
18 | # Setup the directory structure | 23 | # Setup the directory structure |
19 | rm -rf "$tmpdir" | 24 | rm -rf "$tmpdir" |
20 | mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" | 25 | mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" |
26 | if [ "$ARCH" == "um" ] ; then | ||
27 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin" | ||
28 | fi | ||
21 | 29 | ||
22 | # Build and install the kernel | 30 | # Build and install the kernel |
23 | cp System.map "$tmpdir/boot/System.map-$version" | 31 | if [ "$ARCH" == "um" ] ; then |
24 | cp .config "$tmpdir/boot/config-$version" | 32 | $MAKE linux |
25 | cp $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" | ||
37 | else | ||
38 | cp System.map "$tmpdir/boot/System.map-$version" | ||
39 | cp .config "$tmpdir/boot/config-$version" | ||
40 | cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" | ||
41 | fi | ||
26 | 42 | ||
27 | if grep -q '^CONFIG_MODULES=y' .config ; then | 43 | if 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 | ||
29 | fi | 49 | fi |
30 | 50 | ||
31 | # Install the maintainer scripts | 51 | # Install the maintainer scripts |
@@ -60,11 +80,11 @@ Priority: optional | |||
60 | Maintainer: $name | 80 | Maintainer: $name |
61 | Standards-Version: 3.6.1 | 81 | Standards-Version: 3.6.1 |
62 | 82 | ||
63 | Package: linux-$version | 83 | Package: $packagename |
64 | Architecture: any | 84 | Architecture: any |
65 | Description: Linux kernel, version $version | 85 | Description: 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 |
68 | EOF | 88 | EOF |
69 | 89 | ||
70 | # Fix some ownership and permissions | 90 | # Fix some ownership and permissions |