aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/package/builddeb
diff options
context:
space:
mode:
authormaximilian attems <max@stro.at>2011-01-07 10:13:06 -0500
committerMichal Marek <mmarek@suse.cz>2011-01-07 16:45:25 -0500
commitee81b786a07f1d6062d6e14b6152f1f6cc4bc63b (patch)
tree58329fd3701b2e6e82de6f2b5c1fb4f68c9c4946 /scripts/package/builddeb
parente68077856e599cd33d8cd5db15762df60c29d361 (diff)
deb-pkg: s/hdr/kernel_headers_/ && s/header/libc_headers_/
hdrpackage and headerpackage are not intuitive names, use proposed alternatives by Michel Marek. While touching them move the mkdir of the kernel_headers dir up and fix it for paranoid umask. CC: Theodore Ts'o <tytso@mit.edu> Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/package/builddeb')
-rw-r--r--scripts/package/builddeb30
1 files changed, 16 insertions, 14 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 8c1f8d4d156c..b0b2357aef42 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -76,25 +76,27 @@ else
76fi 76fi
77tmpdir="$objtree/debian/tmp" 77tmpdir="$objtree/debian/tmp"
78fwdir="$objtree/debian/fwtmp" 78fwdir="$objtree/debian/fwtmp"
79hdrdir="$objtree/debian/hdrtmp" 79kernel_headers_dir="$objtree/debian/hdrtmp"
80headerdir="$objtree/debian/headertmp" 80libc_headers_dir="$objtree/debian/headertmp"
81packagename=linux-image-$version 81packagename=linux-image-$version
82fwpackagename=linux-firmware-image 82fwpackagename=linux-firmware-image
83hdrpackagename=linux-headers-$version 83kernel_headers_packagename=linux-headers-$version
84headerpackagename=linux-libc-dev 84libc_headers_packagename=linux-libc-dev
85 85
86if [ "$ARCH" = "um" ] ; then 86if [ "$ARCH" = "um" ] ; then
87 packagename=user-mode-linux-$version 87 packagename=user-mode-linux-$version
88fi 88fi
89 89
90# Setup the directory structure 90# Setup the directory structure
91rm -rf "$tmpdir" "$fwdir" "$hdrdir" "$headerdir" 91rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir"
92mkdir -m 755 -p "$tmpdir/DEBIAN" 92mkdir -m 755 -p "$tmpdir/DEBIAN"
93mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" 93mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename"
94mkdir -m 755 -p "$fwdir/DEBIAN" 94mkdir -m 755 -p "$fwdir/DEBIAN"
95mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename" 95mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename"
96mkdir -m 755 -p "$headerdir/DEBIAN" 96mkdir -m 755 -p "$libc_headers_dir/DEBIAN"
97mkdir -p "$headerdir/usr/share/doc/$headerpackagename" 97mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename"
98mkdir -m 755 -p "$kernel_headers_dir/DEBIAN"
99mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename"
98if [ "$ARCH" = "um" ] ; then 100if [ "$ARCH" = "um" ] ; then
99 mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin" 101 mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/bin"
100fi 102fi
@@ -126,7 +128,7 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
126fi 128fi
127 129
128make headers_check 130make headers_check
129make headers_install INSTALL_HDR_PATH="$headerdir/usr" 131make headers_install INSTALL_HDR_PATH="$libc_headers_dir/usr"
130 132
131# Install the maintainer scripts 133# Install the maintainer scripts
132# Note: hook scripts under /etc/kernel are also executed by official Debian 134# Note: hook scripts under /etc/kernel are also executed by official Debian
@@ -239,8 +241,8 @@ fi
239find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$ 241find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$
240find arch/x86/include include scripts -type f >> /tmp/files$$ 242find arch/x86/include include scripts -type f >> /tmp/files$$
241(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$) 243(cd $objtree; find .config Module.symvers include scripts -type f >> /tmp/objfiles$$)
242destdir=$hdrdir/usr/src/linux-headers-$version 244destdir=$kernel_headers_dir/usr/src/linux-headers-$version
243mkdir -p "$destdir" "$hdrdir/DEBIAN" "$hdrdir/usr/share/doc/$hdrpackagename" 245mkdir -p "$destdir"
244tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -) 246tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -)
245(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -) 247(cd $objtree; tar -c -f - -T /tmp/objfiles$$) | (cd $destdir; tar -xf -)
246rm -f /tmp/files$$ /tmp/objfiles$$ 248rm -f /tmp/files$$ /tmp/objfiles$$
@@ -248,7 +250,7 @@ arch=$(dpkg --print-architecture)
248 250
249cat <<EOF >> debian/control 251cat <<EOF >> debian/control
250 252
251Package: $hdrpackagename 253Package: $kernel_headers_packagename
252Provides: linux-headers, linux-headers-2.6 254Provides: linux-headers, linux-headers-2.6
253Architecture: $arch 255Architecture: $arch
254Description: Linux kernel headers for $KERNELRELEASE on $arch 256Description: Linux kernel headers for $KERNELRELEASE on $arch
@@ -257,7 +259,7 @@ Description: Linux kernel headers for $KERNELRELEASE on $arch
257 This is useful for people who need to build external modules 259 This is useful for people who need to build external modules
258EOF 260EOF
259 261
260create_package "$hdrpackagename" "$hdrdir" 262create_package "$kernel_headers_packagename" "$kernel_headers_dir"
261 263
262# Do we have firmware? Move it out of the way and build it into a package. 264# Do we have firmware? Move it out of the way and build it into a package.
263if [ -e "$tmpdir/lib/firmware" ]; then 265if [ -e "$tmpdir/lib/firmware" ]; then
@@ -276,7 +278,7 @@ fi
276 278
277cat <<EOF >> debian/control 279cat <<EOF >> debian/control
278 280
279Package: $headerpackagename 281Package: $libc_headers_packagename
280Section: devel 282Section: devel
281Provides: linux-kernel-headers 283Provides: linux-kernel-headers
282Architecture: any 284Architecture: any
@@ -285,7 +287,7 @@ Description: Linux support headers for userspace development
285 are used by the installed headers for GNU glibc and other system libraries. 287 are used by the installed headers for GNU glibc and other system libraries.
286EOF 288EOF
287 289
288create_package "$headerpackagename" "$headerdir" 290create_package "$libc_headers_packagename" "$libc_headers_dir"
289create_package "$packagename" "$tmpdir" 291create_package "$packagename" "$tmpdir"
290 292
291exit 0 293exit 0