This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / scripts / mkspec
old mode 100644 (file)
new mode 100755 (executable)
similarity index 78%
rename from scripts/package/mkspec
rename to scripts/mkspec
index 5d94e45..e644296
@@ -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 <opencon@rio.skydome.net>
 #
-
-# 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"