diff options
Diffstat (limited to 'scripts/package/builddeb')
-rw-r--r-- | scripts/package/builddeb | 56 |
1 files changed, 50 insertions, 6 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index c279b6310f02..6edb29f2b4a6 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 KBUILD_SRC= 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 |
@@ -53,6 +73,8 @@ linux ($version) unstable; urgency=low | |||
53 | EOF | 73 | EOF |
54 | 74 | ||
55 | # Generate a control file | 75 | # Generate a control file |
76 | if [ "$ARCH" == "um" ]; then | ||
77 | |||
56 | cat <<EOF > debian/control | 78 | cat <<EOF > debian/control |
57 | Source: linux | 79 | Source: linux |
58 | Section: base | 80 | Section: base |
@@ -60,12 +82,34 @@ Priority: optional | |||
60 | Maintainer: $name | 82 | Maintainer: $name |
61 | Standards-Version: 3.6.1 | 83 | Standards-Version: 3.6.1 |
62 | 84 | ||
63 | Package: linux-$version | 85 | Package: $packagename |
86 | Architecture: any | ||
87 | Description: User Mode Linux kernel, version $version | ||
88 | User-mode Linux is a port of the Linux kernel to its own system call | ||
89 | interface. It provides a kind of virtual machine, which runs Linux | ||
90 | as a user process under another Linux kernel. This is useful for | ||
91 | kernel development, sandboxes, jails, experimentation, and | ||
92 | many other things. | ||
93 | . | ||
94 | This package contains the Linux kernel, modules and corresponding other | ||
95 | files version $version | ||
96 | EOF | ||
97 | |||
98 | else | ||
99 | cat <<EOF > debian/control | ||
100 | Source: linux | ||
101 | Section: base | ||
102 | Priority: optional | ||
103 | Maintainer: $name | ||
104 | Standards-Version: 3.6.1 | ||
105 | |||
106 | Package: $packagename | ||
64 | Architecture: any | 107 | Architecture: any |
65 | Description: Linux kernel, version $version | 108 | Description: Linux kernel, version $version |
66 | This package contains the Linux kernel, modules and corresponding other | 109 | This package contains the Linux kernel, modules and corresponding other |
67 | files version $version. | 110 | files version $version |
68 | EOF | 111 | EOF |
112 | fi | ||
69 | 113 | ||
70 | # Fix some ownership and permissions | 114 | # Fix some ownership and permissions |
71 | chown -R root:root "$tmpdir" | 115 | chown -R root:root "$tmpdir" |