diff options
author | Frans Pop <elendil@planet.nl> | 2009-04-22 19:08:31 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-06-09 16:37:35 -0400 |
commit | 4f66199b4b372a530333d0f25aeb5d80362241ed (patch) | |
tree | 2340699675b0195f91bca8377eacda2ba07c4e50 /scripts/package | |
parent | af6c159885537eb6582a61156ccfb73e83c0478d (diff) |
kbuild, deb-pkg: minor general improvements in builddeb script
Minor coding style improvements and typo fix in leading comment.
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Andres Salomon <dilinger@debian.org>
Acked-by: maximilian attems <max@stro.at>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/package')
-rw-r--r-- | scripts/package/builddeb | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 1264b8e2829d..eff7f9de30dc 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb | |||
@@ -4,7 +4,7 @@ | |||
4 | # Copyright 2003 Wichert Akkerman <wichert@wiggy.net> | 4 | # Copyright 2003 Wichert Akkerman <wichert@wiggy.net> |
5 | # | 5 | # |
6 | # Simple script to generate a deb package for a Linux kernel. All the | 6 | # Simple script to generate a deb package for a Linux kernel. All the |
7 | # complexity of what to do with a kernel after it is installer or removed | 7 | # complexity of what to do with a kernel after it is installed or removed |
8 | # is left to other scripts and packages: they can install scripts in the | 8 | # is left to other scripts and packages: they can install scripts in the |
9 | # /etc/kernel/{pre,post}{inst,rm}.d/ directories that will be called on | 9 | # /etc/kernel/{pre,post}{inst,rm}.d/ directories that will be called on |
10 | # package install and removal. | 10 | # package install and removal. |
@@ -13,13 +13,13 @@ set -e | |||
13 | 13 | ||
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 | revision=`cat .version` | 16 | revision=$(cat .version) |
17 | tmpdir="$objtree/debian/tmp" | 17 | tmpdir="$objtree/debian/tmp" |
18 | fwdir="$objtree/debian/fwtmp" | 18 | fwdir="$objtree/debian/fwtmp" |
19 | packagename=linux-$version | 19 | packagename=linux-$version |
20 | fwpackagename=linux-firmware-image | 20 | fwpackagename=linux-firmware-image |
21 | 21 | ||
22 | if [ "$ARCH" == "um" ] ; then | 22 | if [ "$ARCH" = "um" ] ; then |
23 | packagename=user-mode-linux-$version | 23 | packagename=user-mode-linux-$version |
24 | fi | 24 | fi |
25 | 25 | ||
@@ -27,12 +27,12 @@ fi | |||
27 | rm -rf "$tmpdir" "$fwdir" | 27 | rm -rf "$tmpdir" "$fwdir" |
28 | mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" | 28 | mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" |
29 | mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" | 29 | mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" |
30 | if [ "$ARCH" == "um" ] ; then | 30 | if [ "$ARCH" = "um" ] ; then |
31 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin" | 31 | mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin" |
32 | fi | 32 | fi |
33 | 33 | ||
34 | # Build and install the kernel | 34 | # Build and install the kernel |
35 | if [ "$ARCH" == "um" ] ; then | 35 | if [ "$ARCH" = "um" ] ; then |
36 | $MAKE linux | 36 | $MAKE linux |
37 | cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" | 37 | cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" |
38 | cp .config "$tmpdir/usr/share/doc/$packagename/config" | 38 | cp .config "$tmpdir/usr/share/doc/$packagename/config" |
@@ -46,7 +46,7 @@ fi | |||
46 | 46 | ||
47 | if grep -q '^CONFIG_MODULES=y' .config ; then | 47 | if grep -q '^CONFIG_MODULES=y' .config ; then |
48 | INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install | 48 | INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install |
49 | if [ "$ARCH" == "um" ] ; then | 49 | if [ "$ARCH" = "um" ] ; then |
50 | mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" | 50 | mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" |
51 | rmdir "$tmpdir/lib/modules/$version" | 51 | rmdir "$tmpdir/lib/modules/$version" |
52 | fi | 52 | fi |
@@ -77,9 +77,8 @@ linux ($version-$revision) unstable; urgency=low | |||
77 | EOF | 77 | EOF |
78 | 78 | ||
79 | # Generate a control file | 79 | # Generate a control file |
80 | if [ "$ARCH" == "um" ]; then | 80 | if [ "$ARCH" = "um" ]; then |
81 | 81 | cat <<EOF > debian/control | |
82 | cat <<EOF > debian/control | ||
83 | Source: linux | 82 | Source: linux |
84 | Section: base | 83 | Section: base |
85 | Priority: optional | 84 | Priority: optional |
@@ -101,7 +100,7 @@ Description: User Mode Linux kernel, version $version | |||
101 | EOF | 100 | EOF |
102 | 101 | ||
103 | else | 102 | else |
104 | cat <<EOF > debian/control | 103 | cat <<EOF > debian/control |
105 | Source: linux | 104 | Source: linux |
106 | Section: base | 105 | Section: base |
107 | Priority: optional | 106 | Priority: optional |
@@ -116,6 +115,7 @@ Description: Linux kernel, version $version | |||
116 | This package contains the Linux kernel, modules and corresponding other | 115 | This package contains the Linux kernel, modules and corresponding other |
117 | files version $version | 116 | files version $version |
118 | EOF | 117 | EOF |
118 | |||
119 | fi | 119 | fi |
120 | 120 | ||
121 | # Fix some ownership and permissions | 121 | # Fix some ownership and permissions |
@@ -143,4 +143,3 @@ dpkg-gencontrol -isp -p$packagename | |||
143 | dpkg --build "$tmpdir" .. | 143 | dpkg --build "$tmpdir" .. |
144 | 144 | ||
145 | exit 0 | 145 | exit 0 |
146 | |||