X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fpackage%2Fmkspec;h=5d94e452a0c0d245dfe781d95ba389a1afb38315;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=3ecfc23e0921073382b49581e56bee073b99d1a2;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 3ecfc23e0..5d94e452a 100644 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -9,6 +9,13 @@ # Patched for non-x86 by Opencon (L) 2002 # +# 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'