diff options
author | maximilian attems <max@stro.at> | 2011-01-07 10:13:06 -0500 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2011-01-07 16:45:25 -0500 |
commit | ee81b786a07f1d6062d6e14b6152f1f6cc4bc63b (patch) | |
tree | 58329fd3701b2e6e82de6f2b5c1fb4f68c9c4946 | |
parent | e68077856e599cd33d8cd5db15762df60c29d361 (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>
-rw-r--r-- | scripts/package/builddeb | 30 |
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 | |||
76 | fi | 76 | fi |
77 | tmpdir="$objtree/debian/tmp" | 77 | tmpdir="$objtree/debian/tmp" |
78 | fwdir="$objtree/debian/fwtmp" | 78 | fwdir="$objtree/debian/fwtmp" |
79 | hdrdir="$objtree/debian/hdrtmp" | 79 | kernel_headers_dir="$objtree/debian/hdrtmp" |
80 | headerdir="$objtree/debian/headertmp" | 80 | libc_headers_dir="$objtree/debian/headertmp" |
81 | packagename=linux-image-$version | 81 | packagename=linux-image-$version |
82 | fwpackagename=linux-firmware-image | 82 | fwpackagename=linux-firmware-image |
83 | hdrpackagename=linux-headers-$version | 83 | kernel_headers_packagename=linux-headers-$version |
84 | headerpackagename=linux-libc-dev | 84 | libc_headers_packagename=linux-libc-dev |
85 | 85 | ||
86 | if [ "$ARCH" = "um" ] ; then | 86 | if [ "$ARCH" = "um" ] ; then |
87 | packagename=user-mode-linux-$version | 87 | packagename=user-mode-linux-$version |
88 | fi | 88 | fi |
89 | 89 | ||
90 | # Setup the directory structure | 90 | # Setup the directory structure |
91 | rm -rf "$tmpdir" "$fwdir" "$hdrdir" "$headerdir" | 91 | rm -rf "$tmpdir" "$fwdir" "$kernel_headers_dir" "$libc_headers_dir" |
92 | mkdir -m 755 -p "$tmpdir/DEBIAN" | 92 | mkdir -m 755 -p "$tmpdir/DEBIAN" |
93 | mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" | 93 | mkdir -p "$tmpdir/lib" "$tmpdir/boot" "$tmpdir/usr/share/doc/$packagename" |
94 | mkdir -m 755 -p "$fwdir/DEBIAN" | 94 | mkdir -m 755 -p "$fwdir/DEBIAN" |
95 | mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename" | 95 | mkdir -p "$fwdir/lib" "$fwdir/usr/share/doc/$fwpackagename" |
96 | mkdir -m 755 -p "$headerdir/DEBIAN" | 96 | mkdir -m 755 -p "$libc_headers_dir/DEBIAN" |
97 | mkdir -p "$headerdir/usr/share/doc/$headerpackagename" | 97 | mkdir -p "$libc_headers_dir/usr/share/doc/$libc_headers_packagename" |
98 | mkdir -m 755 -p "$kernel_headers_dir/DEBIAN" | ||
99 | mkdir -p "$kernel_headers_dir/usr/share/doc/$kernel_headers_packagename" | ||
98 | if [ "$ARCH" = "um" ] ; then | 100 | if [ "$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" |
100 | fi | 102 | fi |
@@ -126,7 +128,7 @@ if grep -q '^CONFIG_MODULES=y' .config ; then | |||
126 | fi | 128 | fi |
127 | 129 | ||
128 | make headers_check | 130 | make headers_check |
129 | make headers_install INSTALL_HDR_PATH="$headerdir/usr" | 131 | make 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 | |||
239 | find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$ | 241 | find . -name Makefile -o -name Kconfig\* -o -name \*.pl > /tmp/files$$ |
240 | find arch/x86/include include scripts -type f >> /tmp/files$$ | 242 | find 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$$) |
242 | destdir=$hdrdir/usr/src/linux-headers-$version | 244 | destdir=$kernel_headers_dir/usr/src/linux-headers-$version |
243 | mkdir -p "$destdir" "$hdrdir/DEBIAN" "$hdrdir/usr/share/doc/$hdrpackagename" | 245 | mkdir -p "$destdir" |
244 | tar -c -f - -T /tmp/files$$ | (cd $destdir; tar -xf -) | 246 | tar -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 -) |
246 | rm -f /tmp/files$$ /tmp/objfiles$$ | 248 | rm -f /tmp/files$$ /tmp/objfiles$$ |
@@ -248,7 +250,7 @@ arch=$(dpkg --print-architecture) | |||
248 | 250 | ||
249 | cat <<EOF >> debian/control | 251 | cat <<EOF >> debian/control |
250 | 252 | ||
251 | Package: $hdrpackagename | 253 | Package: $kernel_headers_packagename |
252 | Provides: linux-headers, linux-headers-2.6 | 254 | Provides: linux-headers, linux-headers-2.6 |
253 | Architecture: $arch | 255 | Architecture: $arch |
254 | Description: Linux kernel headers for $KERNELRELEASE on $arch | 256 | Description: 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 |
258 | EOF | 260 | EOF |
259 | 261 | ||
260 | create_package "$hdrpackagename" "$hdrdir" | 262 | create_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. |
263 | if [ -e "$tmpdir/lib/firmware" ]; then | 265 | if [ -e "$tmpdir/lib/firmware" ]; then |
@@ -276,7 +278,7 @@ fi | |||
276 | 278 | ||
277 | cat <<EOF >> debian/control | 279 | cat <<EOF >> debian/control |
278 | 280 | ||
279 | Package: $headerpackagename | 281 | Package: $libc_headers_packagename |
280 | Section: devel | 282 | Section: devel |
281 | Provides: linux-kernel-headers | 283 | Provides: linux-kernel-headers |
282 | Architecture: any | 284 | Architecture: 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. |
286 | EOF | 288 | EOF |
287 | 289 | ||
288 | create_package "$headerpackagename" "$headerdir" | 290 | create_package "$libc_headers_packagename" "$libc_headers_dir" |
289 | create_package "$packagename" "$tmpdir" | 291 | create_package "$packagename" "$tmpdir" |
290 | 292 | ||
291 | exit 0 | 293 | exit 0 |