aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package/builddeb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/builddeb')
-rw-r--r--scripts/package/builddeb56
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
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 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
29fi 49fi
30 50
31# Install the maintainer scripts 51# Install the maintainer scripts
@@ -53,6 +73,8 @@ linux ($version) unstable; urgency=low
53EOF 73EOF
54 74
55# Generate a control file 75# Generate a control file
76if [ "$ARCH" == "um" ]; then
77
56cat <<EOF > debian/control 78cat <<EOF > debian/control
57Source: linux 79Source: linux
58Section: base 80Section: base
@@ -60,12 +82,34 @@ Priority: optional
60Maintainer: $name 82Maintainer: $name
61Standards-Version: 3.6.1 83Standards-Version: 3.6.1
62 84
63Package: linux-$version 85Package: $packagename
86Architecture: any
87Description: 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
96EOF
97
98else
99cat <<EOF > debian/control
100Source: linux
101Section: base
102Priority: optional
103Maintainer: $name
104Standards-Version: 3.6.1
105
106Package: $packagename
64Architecture: any 107Architecture: any
65Description: Linux kernel, version $version 108Description: 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
68EOF 111EOF
112fi
69 113
70# Fix some ownership and permissions 114# Fix some ownership and permissions
71chown -R root:root "$tmpdir" 115chown -R root:root "$tmpdir"