summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorArun Sharma <asharma@fb.com>2011-05-17 10:36:16 -0700
committerMichal Marek <mmarek@suse.cz>2011-05-24 18:28:29 +0200
commit0bd41dfc9fbbcf174d5336c1c9fc5ba917519761 (patch)
treedca660cd36a6d3ddbd6c77aaa80b0b6c12039cfc /scripts
parent857c7e438769c0f251092a20b587d6e743ee489d (diff)
kbuild: Create a kernel-headers RPM
To compile binaries which depend on new kernel interfaces, we need a kernel-headers RPM Signed-off-by: Arun Sharma <asharma@fb.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/package/mkspec17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index ed8b6a8b4b8e..4bf17ddf7c7f 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -47,6 +47,18 @@ echo ""
echo "%description"
echo "The Linux Kernel, the operating system core itself"
echo ""
+echo "%package headers"
+echo "Summary: Header files for the Linux kernel for use by glibc"
+echo "Group: Development/System"
+echo "Obsoletes: kernel-headers"
+echo "Provides: kernel-headers = %{version}"
+echo "%description headers"
+echo "Kernel-headers includes the C header files that specify the interface"
+echo "between the Linux kernel and userspace libraries and programs. The"
+echo "header files define structures and constants that are needed for"
+echo "building most standard programs and are also needed for rebuilding the"
+echo "glibc package."
+echo ""
if ! $PREBUILT; then
echo "%prep"
@@ -83,6 +95,7 @@ echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$KERNELRELEASE"
echo "%endif"
echo "%endif"
+echo 'make %{?_smp_mflags} INSTALL_HDR_PATH=$RPM_BUILD_ROOT/usr headers_install'
echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$KERNELRELEASE"
echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$KERNELRELEASE"
@@ -105,3 +118,7 @@ echo "/lib/modules/$KERNELRELEASE"
echo "/lib/firmware"
echo "/boot/*"
echo ""
+echo "%files headers"
+echo '%defattr (-, root, root)'
+echo "/usr/include"
+echo ""