Skip to content

Commit

Permalink
scripts/package: binrpm-pkg do not create source and devel package
Browse files Browse the repository at this point in the history
When doing make binrpm-pkg we only want to build the binary and header
package as the documentation of binrpm-pkg target claims. Hence this
patch avoid building the source and devel package. This makes binrpm-pkg
target lot faster and way more usefull.

Signed-off-by: Jérôme Glisse <[email protected]>
Cc: Michal Marek <[email protected]>
[mmarek: used subject line from v3]
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
Jérôme Glisse authored and michal42 committed Dec 8, 2014
1 parent dfe0487 commit b9a5442
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/package/mkspec
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,15 @@ echo 'mv vmlinux.bz2 $RPM_BUILD_ROOT'"/boot/vmlinux-$KERNELRELEASE.bz2"
echo 'mv vmlinux.orig vmlinux'
echo "%endif"

if ! $PREBUILT; then
echo 'rm -f $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE/{build,source}"
echo "mkdir -p "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE"
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\""
echo "tar "'$EXCLUDES'" -cf- . | (cd "'$RPM_BUILD_ROOT'"/usr/src/kernels/$KERNELRELEASE;tar xvf -)"
echo 'cd $RPM_BUILD_ROOT'"/lib/modules/$KERNELRELEASE"
echo "ln -sf /usr/src/kernels/$KERNELRELEASE build"
echo "ln -sf /usr/src/kernels/$KERNELRELEASE source"
fi

echo ""
echo "%clean"
Expand Down Expand Up @@ -151,9 +153,11 @@ echo "%files headers"
echo '%defattr (-, root, root)'
echo "/usr/include"
echo ""
if ! $PREBUILT; then
echo "%files devel"
echo '%defattr (-, root, root)'
echo "/usr/src/kernels/$KERNELRELEASE"
echo "/lib/modules/$KERNELRELEASE/build"
echo "/lib/modules/$KERNELRELEASE/source"
echo ""
fi

0 comments on commit b9a5442

Please sign in to comment.