diff options
| author | Greg Edwards <edwardsg@sgi.com> | 2004-07-21 03:57:07 +0200 |
|---|---|---|
| committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-07-21 03:57:07 +0200 |
| commit | f0d8c63be2017f2d3ef0261a2bcebbab8df7e65f (patch) | |
| tree | 9ef038490abf22433679370e537d0a05213806b6 /scripts/package/mkspec | |
| parent | 1bb0fa189c6ae75cbf440244ae77a8ede9912df1 (diff) | |
kbuild: build binary rpm from pre-built tree
Many times it would be nice to quickly package up a kernel tree you're
working on, without having to rebuild the whole thing again from a clean
source tree (like the current rpm-pkg target does). The patch below
adds an "binrpm-pkg" target which uses your existing (already built)
tree.
Modified by me to always do a make and use binrpm-pkg.
Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/package/mkspec')
| -rwxr-xr-x | scripts/package/mkspec | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 3ecfc23e0921..5d94e452a0c0 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -9,6 +9,13 @@ # Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net> # +# how we were called determines which rpms we build and how we build them +if [ "$1" = "prebuilt" ]; then + PREBUILT=true +else + PREBUILT=false +fi + # starting to output the spec if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then PROVIDES=kernel-drm @@ -26,8 +33,12 @@ echo "License: GPL" echo "Group: System Environment/Kernel" echo "Vendor: The Linux Community" echo "URL: http://www.kernel.org" + +if ! $PREBUILT; then echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL" echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g" +fi + echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root" echo "Provides: $PROVIDES" echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :" @@ -36,12 +47,20 @@ echo "" echo "%description" echo "The Linux Kernel, the operating system core itself" echo "" + +if ! $PREBUILT; then echo "%prep" echo "%setup -q" echo "" +fi + echo "%build" + +if ! $PREBUILT; then echo "make clean && make" echo "" +fi + echo "%install" echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules' |
