X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=scripts%2Fmkspec;fp=scripts%2Fpackage%2Fmkspec;h=e64429666a8961da78b7f52e26fc2d2306e352bf;hb=5e3b93f248c98873cc843e83092bb8da92ac85a2;hp=5d94e452a0c0d245dfe781d95ba389a1afb38315;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/scripts/package/mkspec b/scripts/mkspec old mode 100644 new mode 100755 similarity index 78% rename from scripts/package/mkspec rename to scripts/mkspec index 5d94e452a..e64429666 --- a/scripts/package/mkspec +++ b/scripts/mkspec @@ -3,19 +3,18 @@ # Output a simple RPM spec file that uses no fancy features requring # RPM v4. This is intended to work with any RPM distro. # -# The only gothic bit here is redefining install_post to avoid +# The only gothic bit here is redefining install_post to avoid # stripping the symbols from files in the kernel which we want # # 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 +# That's the voodoo to see if it's a x86. +ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86` +if [ ! -z $ISX86 ]; then + PC=1 else - PREBUILT=false + PC=0 fi - # starting to output the spec if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then PROVIDES=kernel-drm @@ -33,12 +32,8 @@ 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 || :" @@ -47,28 +42,23 @@ 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 "make clean all" echo "" -fi - echo "%install" echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules' - echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make modules_install' -echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" - +# This is the first disagreement between i386 and most others +if [ $PC = 1 ]; then + echo 'cp arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" +else + echo 'cp vmlinux $RPM_BUILD_ROOT'"/boot/vmlinux-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" +fi +# Back on track echo 'cp System.map $RPM_BUILD_ROOT'"/boot/System.map-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" - echo 'cp .config $RPM_BUILD_ROOT'"/boot/config-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION" echo "" echo "%clean"