[PATCH 2/6] kbuild: Add a kernel-devel package

Arun Sharma
2011-05-17T17:37:48Z

Useful for building modules without having kernel sources

Signed-off-by: Arun Sharma <asharma@fb.com>
---
scripts/package/mkspec | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index b820677..81b6057 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -47,6 +47,14 @@ echo ""
echo "%description"
echo "The Linux Kernel, the operating system core itself"
echo ""
+echo "%package devel"
+echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel"
+echo "Group: System Environment/Kernel"
+echo "AutoReqProv: no"
+echo "%description -n kernel-devel"
+echo "This package provides kernel headers and makefiles sufficient to build modules"
+echo "against the $__KERNELRELEASE kernel package."
+echo ""

if ! $PREBUILT; then
echo "%prep"
@@ -118,3 +126,7 @@ echo "/lib/modules/$KERNELRELEASE"
echo "/lib/firmware"
echo "/boot/*"
echo ""
+echo "%files devel"
+echo '%defattr (-, root, root)'
+echo "/usr/src/kernels/$KERNELRELEASE"
+echo ""
--
1.7.4