diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 15:03:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 15:03:47 -0400 |
commit | 62af8163f9caa5b21996338ccd2564dfd727670e (patch) | |
tree | 73576f4970fe7f3653ebc07eb7b70f8c651e7522 /scripts/package | |
parent | 57bb55957432f20fd6e5bb5ddfbd9987439157ec (diff) | |
parent | 0bd41dfc9fbbcf174d5336c1c9fc5ba917519761 (diff) |
Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kbuild: Create a kernel-headers RPM
rpm-pkg: Fix when current directory is a symlink
Replace '-' in kernel version with '_'
Diffstat (limited to 'scripts/package')
-rw-r--r-- | scripts/package/Makefile | 4 | ||||
-rwxr-xr-x | scripts/package/mkspec | 19 |
2 files changed, 20 insertions, 3 deletions
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index a834b935f536..006960ebbce9 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -26,9 +26,9 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ | |||
26 | else echo rpm; fi) | 26 | else echo rpm; fi) |
27 | 27 | ||
28 | # Remove hyphens since they have special meaning in RPM filenames | 28 | # Remove hyphens since they have special meaning in RPM filenames |
29 | KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE)) | 29 | KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE)) |
30 | MKSPEC := $(srctree)/scripts/package/mkspec | 30 | MKSPEC := $(srctree)/scripts/package/mkspec |
31 | PREV := set -e; cd ..; | 31 | PREV := set -e; cd -P ..; |
32 | 32 | ||
33 | # rpm-pkg | 33 | # rpm-pkg |
34 | # --------------------------------------------------------------------------- | 34 | # --------------------------------------------------------------------------- |
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index e1c1d5b8ca70..4bf17ddf7c7f 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
@@ -22,7 +22,7 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then | |||
22 | fi | 22 | fi |
23 | 23 | ||
24 | PROVIDES="$PROVIDES kernel-$KERNELRELEASE" | 24 | PROVIDES="$PROVIDES kernel-$KERNELRELEASE" |
25 | __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"` | 25 | __KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"` |
26 | 26 | ||
27 | echo "Name: kernel" | 27 | echo "Name: kernel" |
28 | echo "Summary: The Linux Kernel" | 28 | echo "Summary: The Linux Kernel" |
@@ -47,6 +47,18 @@ echo "" | |||
47 | echo "%description" | 47 | echo "%description" |
48 | echo "The Linux Kernel, the operating system core itself" | 48 | echo "The Linux Kernel, the operating system core itself" |
49 | echo "" | 49 | echo "" |
50 | echo "%package headers" | ||
51 | echo "Summary: Header files for the Linux kernel for use by glibc" | ||
52 | echo "Group: Development/System" | ||
53 | echo "Obsoletes: kernel-headers" | ||
54 | echo "Provides: kernel-headers = %{version}" | ||
55 | echo "%description headers" | ||
56 | echo "Kernel-headers includes the C header files that specify the interface" | ||
57 | echo "between the Linux kernel and userspace libraries and programs. The" | ||
58 | echo "header files define structures and constants that are needed for" | ||
59 | echo "building most standard programs and are also needed for rebuilding the" | ||
60 | echo "glibc package." | ||
61 | echo "" | ||
50 | 62 | ||
51 | if ! $PREBUILT; then | 63 | if ! $PREBUILT; then |
52 | echo "%prep" | 64 | echo "%prep" |
@@ -83,6 +95,7 @@ echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE" | |||
83 | echo "%endif" | 95 | echo "%endif" |
84 | echo "%endif" | 96 | echo "%endif" |
85 | 97 | ||
98 | echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install' | ||
86 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" | 99 | echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE" |
87 | 100 | ||
88 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" | 101 | echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE" |
@@ -105,3 +118,7 @@ echo "/lib/modules/$KERNELRELEASE" | |||
105 | echo "/lib/firmware" | 118 | echo "/lib/firmware" |
106 | echo "/boot/*" | 119 | echo "/boot/*" |
107 | echo "" | 120 | echo "" |
121 | echo "%files headers" | ||
122 | echo '%defattr (-, root, root)' | ||
123 | echo "/usr/include" | ||
124 | echo "" | ||