aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2009-04-22 19:08:31 -0400
committerSam Ravnborg <sam@ravnborg.org>2009-06-09 16:37:35 -0400
commit4f66199b4b372a530333d0f25aeb5d80362241ed (patch)
tree2340699675b0195f91bca8377eacda2ba07c4e50 /scripts
parentaf6c159885537eb6582a61156ccfb73e83c0478d (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')
-rw-r--r--scripts/package/builddeb21
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
15version=$KERNELRELEASE 15version=$KERNELRELEASE
16revision=`cat .version` 16revision=$(cat .version)
17tmpdir="$objtree/debian/tmp" 17tmpdir="$objtree/debian/tmp"
18fwdir="$objtree/debian/fwtmp" 18fwdir="$objtree/debian/fwtmp"
19packagename=linux-$version 19packagename=linux-$version
20fwpackagename=linux-firmware-image 20fwpackagename=linux-firmware-image
21 21
22if [ "$ARCH" == "um" ] ; then 22if [ "$ARCH" = "um" ] ; then
23 packagename=user-mode-linux-$version 23 packagename=user-mode-linux-$version
24fi 24fi
25 25
@@ -27,12 +27,12 @@ fi
27rm -rf "$tmpdir" "$fwdir" 27rm -rf "$tmpdir" "$fwdir"
28mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" 28mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
29mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" 29mkdir -p "$fwdir/DEBIAN" "$fwdir/lib"
30if [ "$ARCH" == "um" ] ; then 30if [ "$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"
32fi 32fi
33 33
34# Build and install the kernel 34# Build and install the kernel
35if [ "$ARCH" == "um" ] ; then 35if [ "$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
47if grep -q '^CONFIG_MODULES=y' .config ; then 47if 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
77EOF 77EOF
78 78
79# Generate a control file 79# Generate a control file
80if [ "$ARCH" == "um" ]; then 80if [ "$ARCH" = "um" ]; then
81 81 cat <<EOF > debian/control
82cat <<EOF > debian/control
83Source: linux 82Source: linux
84Section: base 83Section: base
85Priority: optional 84Priority: optional
@@ -101,7 +100,7 @@ Description: User Mode Linux kernel, version $version
101EOF 100EOF
102 101
103else 102else
104cat <<EOF > debian/control 103 cat <<EOF > debian/control
105Source: linux 104Source: linux
106Section: base 105Section: base
107Priority: optional 106Priority: 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
118EOF 117EOF
118
119fi 119fi
120 120
121# Fix some ownership and permissions 121# Fix some ownership and permissions
@@ -143,4 +143,3 @@ dpkg-gencontrol -isp -p$packagename
143dpkg --build "$tmpdir" .. 143dpkg --build "$tmpdir" ..
144 144
145exit 0 145exit 0
146