diff options
-rwxr-xr-x | scripts/package/mkspec | 28 |
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" | |||
59 | echo "building most standard programs and are also needed for rebuilding the" | 59 | echo "building most standard programs and are also needed for rebuilding the" |
60 | echo "glibc package." | 60 | echo "glibc package." |
61 | echo "" | 61 | echo "" |
62 | echo "%package devel" | ||
63 | echo "Summary: Development package for building kernel modules to match the $__KERNELRELEASE kernel" | ||
64 | echo "Group: System Environment/Kernel" | ||
65 | echo "AutoReqProv: no" | ||
66 | echo "%description -n kernel-devel" | ||
67 | echo "This package provides kernel headers and makefiles sufficient to build modules" | ||
68 | echo "against the $__KERNELRELEASE kernel package." | ||
69 | echo "" | ||
62 | 70 | ||
63 | if ! $PREBUILT; then | 71 | if ! $PREBUILT; then |
64 | echo "%prep" | 72 | echo "%prep" |
@@ -109,6 +117,14 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2" | |||
109 | echo 'mv vmlinux.orig vmlinux' | 117 | echo 'mv vmlinux.orig vmlinux' |
110 | echo "%endif" | 118 | echo "%endif" |
111 | 119 | ||
120 | echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}" | ||
121 | echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE" | ||
122 | echo "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\"" | ||
123 | echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)" | ||
124 | echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE" | ||
125 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE build" | ||
126 | echo "ln -sf /usr/src/kernels/$KERNELRELEASE source" | ||
127 | |||
112 | echo "" | 128 | echo "" |
113 | echo "%clean" | 129 | echo "%clean" |
114 | echo 'rm -rf $RPM_BUILD_ROOT' | 130 | echo 'rm -rf $RPM_BUILD_ROOT' |
@@ -126,6 +142,8 @@ echo "%files" | |||
126 | echo '%defattr (-, root, root)' | 142 | echo '%defattr (-, root, root)' |
127 | echo "%dir /lib/modules" | 143 | echo "%dir /lib/modules" |
128 | echo "/lib/modules/$KERNELRELEASE" | 144 | echo "/lib/modules/$KERNELRELEASE" |
145 | echo "%exclude /lib/modules/$KERNELRELEASE/build" | ||
146 | echo "%exclude /lib/modules/$KERNELRELEASE/source" | ||
129 | echo "/lib/firmware/$KERNELRELEASE" | 147 | echo "/lib/firmware/$KERNELRELEASE" |
130 | echo "/boot/*" | 148 | echo "/boot/*" |
131 | echo "" | 149 | echo "" |
@@ -133,3 +151,9 @@ echo "%files headers" | |||
133 | echo '%defattr (-, root, root)' | 151 | echo '%defattr (-, root, root)' |
134 | echo "/usr/include" | 152 | echo "/usr/include" |
135 | echo "" | 153 | echo "" |
154 | echo "%files devel" | ||
155 | echo '%defattr (-, root, root)' | ||
156 | echo "/usr/src/kernels/$KERNELRELEASE" | ||
157 | echo "/lib/modules/$KERNELRELEASE/build" | ||
158 | echo "/lib/modules/$KERNELRELEASE/source" | ||
159 | echo "" | ||