Skip to content

Commit

Permalink
Merge branch 'packaging' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/mmarek/kbuild-2.6

* 'packaging' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kbuild: Create a kernel-headers RPM
  rpm-pkg: Fix when current directory is a symlink
  Replace '-' in kernel version with '_'
  • Loading branch information
torvalds committed May 25, 2011
2 parents 57bb559 + 0bd41df commit 62af816
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/package/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \
else echo rpm; fi)

# Remove hyphens since they have special meaning in RPM filenames
KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE))
KERNELPATH := kernel-$(subst -,_,$(KERNELRELEASE))
MKSPEC := $(srctree)/scripts/package/mkspec
PREV := set -e; cd ..;
PREV := set -e; cd -P ..;

# rpm-pkg
# ---------------------------------------------------------------------------
Expand Down
19 changes: 18 additions & 1 deletion scripts/package/mkspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
fi

PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-//g"`
__KERNELRELEASE=`echo $KERNELRELEASE | sed -e "s/-/_/g"`

echo "Name: kernel"
echo "Summary: The Linux Kernel"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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 ""

0 comments on commit 62af816

Please sign in to comment.