aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package/builddeb
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/builddeb')
-rw-r--r--scripts/package/builddeb37
1 files changed, 20 insertions, 17 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index eff7f9de30dc..feebd69c2eea 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -11,6 +11,18 @@
11 11
12set -e 12set -e
13 13
14create_package() {
15 local pname="$1" pdir="$2"
16
17 # Fix ownership and permissions
18 chown -R root:root "$pdir"
19 chmod -R go-w "$pdir"
20
21 # Create the package
22 dpkg-gencontrol -isp -p$pname -P"$pdir"
23 dpkg --build "$pdir" ..
24}
25
14# Some variables and settings used throughout the script 26# Some variables and settings used throughout the script
15version=$KERNELRELEASE 27version=$KERNELRELEASE
16revision=$(cat .version) 28revision=$(cat .version)
@@ -77,13 +89,16 @@ linux ($version-$revision) unstable; urgency=low
77EOF 89EOF
78 90
79# Generate a control file 91# Generate a control file
80if [ "$ARCH" = "um" ]; then 92cat <<EOF > debian/control
81 cat <<EOF > debian/control
82Source: linux 93Source: linux
83Section: base 94Section: base
84Priority: optional 95Priority: optional
85Maintainer: $name 96Maintainer: $name
86Standards-Version: 3.6.1 97Standards-Version: 3.6.1
98EOF
99
100if [ "$ARCH" = "um" ]; then
101 cat <<EOF >> debian/control
87 102
88Package: $packagename 103Package: $packagename
89Provides: kernel-image-$version, linux-image-$version 104Provides: kernel-image-$version, linux-image-$version
@@ -100,12 +115,7 @@ Description: User Mode Linux kernel, version $version
100EOF 115EOF
101 116
102else 117else
103 cat <<EOF > debian/control 118 cat <<EOF >> debian/control
104Source: linux
105Section: base
106Priority: optional
107Maintainer: $name
108Standards-Version: 3.6.1
109 119
110Package: $packagename 120Package: $packagename
111Provides: kernel-image-$version, linux-image-$version 121Provides: kernel-image-$version, linux-image-$version
@@ -118,10 +128,6 @@ EOF
118 128
119fi 129fi
120 130
121# Fix some ownership and permissions
122chown -R root:root "$tmpdir"
123chmod -R go-w "$tmpdir"
124
125# Do we have firmware? Move it out of the way and build it into a package. 131# Do we have firmware? Move it out of the way and build it into a package.
126if [ -e "$tmpdir/lib/firmware" ]; then 132if [ -e "$tmpdir/lib/firmware" ]; then
127 mv "$tmpdir/lib/firmware" "$fwdir/lib/" 133 mv "$tmpdir/lib/firmware" "$fwdir/lib/"
@@ -134,12 +140,9 @@ Description: Linux kernel firmware, version $version
134 This package contains firmware from the Linux kernel, version $version 140 This package contains firmware from the Linux kernel, version $version
135EOF 141EOF
136 142
137 dpkg-gencontrol -isp -p$fwpackagename -P"$fwdir" 143 create_package "$fwpackagename" "$fwdir"
138 dpkg --build "$fwdir" ..
139fi 144fi
140 145
141# Perform the final magic 146create_package "$packagename" "$tmpdir"
142dpkg-gencontrol -isp -p$packagename
143dpkg --build "$tmpdir" ..
144 147
145exit 0 148exit 0