aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/package/mkspec28
1 files changed, 26 insertions, 2 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 514aeb2bb422..13957602f7ca 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# Output a simple RPM spec file that uses no fancy features requiring 3# Output a simple RPM spec file.
4# RPM v4. This is intended to work with any RPM distro. 4# This version assumes a minimum of RPM 4.0.3.
5# 5#
6# The only gothic bit here is redefining install_post to avoid 6# The only gothic bit here is redefining install_post to avoid
7# stripping the symbols from files in the kernel which we want 7# stripping the symbols from files in the kernel which we want
@@ -59,6 +59,14 @@ echo "header files define structures and constants that are needed for"
59echo "building most standard programs and are also needed for rebuilding the" 59echo "building most standard programs and are also needed for rebuilding the"
60echo "glibc package." 60echo "glibc package."
61echo "" 61echo ""
62echo "%package devel"
63echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel"
64echo "Group: System Environment/Kernel"
65echo "AutoReqProv: no"
66echo "%description -n kernel-devel"
67echo "This package provides kernel headers and makefiles sufficient to build modules"
68echo "against the $__KERNELRELEASE kernel package."
69echo ""
62 70
63if ! $PREBUILT; then 71if ! $PREBUILT; then
64echo "%prep" 72echo "%prep"
@@ -109,6 +117,14 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
109echo 'mv vmlinux.orig vmlinux' 117echo 'mv vmlinux.orig vmlinux'
110echo "%endif" 118echo "%endif"
111 119
120echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
121echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
122echo "EXCLUDES=\"$RCS_TAR_IGNORE --exclude .tmp_versions --exclude=*vmlinux* --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation --exclude=firmware --exclude .config.old --exclude .missing-syscalls.d\""
123echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
124echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
125echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
126echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
127
112echo "" 128echo ""
113echo "%clean" 129echo "%clean"
114echo 'rm -rf $RPM_BUILD_ROOT' 130echo 'rm -rf $RPM_BUILD_ROOT'
@@ -126,6 +142,8 @@ echo "%files"
126echo '%defattr (-, root, root)' 142echo '%defattr (-, root, root)'
127echo "%dir /lib/modules" 143echo "%dir /lib/modules"
128echo "/lib/modules/$KERNELRELEASE" 144echo "/lib/modules/$KERNELRELEASE"
145echo "%exclude /lib/modules/$KERNELRELEASE/build"
146echo "%exclude /lib/modules/$KERNELRELEASE/source"
129echo "/lib/firmware/$KERNELRELEASE" 147echo "/lib/firmware/$KERNELRELEASE"
130echo "/boot/*" 148echo "/boot/*"
131echo "" 149echo ""
@@ -133,3 +151,9 @@ echo "%files headers"
133echo '%defattr (-, root, root)' 151echo '%defattr (-, root, root)'
134echo "/usr/include" 152echo "/usr/include"
135echo "" 153echo ""
154echo "%files devel"
155echo '%defattr (-, root, root)'
156echo "/usr/src/kernels/$KERNELRELEASE"
157echo "/lib/modules/$KERNELRELEASE/build"
158echo "/lib/modules/$KERNELRELEASE/source"
159echo ""