patch-2.4.19 linux-2.4.19/scripts/mkspec
Next file: linux-2.4.19/scripts/patch-kernel
Previous file: linux-2.4.19/scripts/mkdep.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Fri Aug 2 17:39:46 2002
- Orig file:
linux-2.4.18/scripts/mkspec
- Orig date:
Mon Feb 25 11:38:16 2002
diff -urN linux-2.4.18/scripts/mkspec linux-2.4.19/scripts/mkspec
@@ -6,6 +6,22 @@
# 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>
+#
+# That's the voodoo to see if it's a x86.
+ISX86=`arch | grep -ie i.86`
+if [ ! -z $ISX86 ]; then
+ PC=1
+else
+ PC=0
+fi
+# starting to output the spec
+if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
+ PROVIDES=kernel-drm
+fi
+
+PROVIDES="$PROVIDES kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+
echo "Name: kernel"
echo "Summary: The Linux Kernel"
echo "Version: "$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION | sed -e "s/-//g"
@@ -19,6 +35,7 @@
echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL"
echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g"
echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
+echo "Provides: $PROVIDES"
echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
echo ""
echo "%description"
@@ -28,13 +45,26 @@
echo "%setup -q"
echo ""
echo "%build"
-echo "make oldconfig dep clean bzImage modules"
+# This is the first 'disagreement' between x86 and other archs.
+if [ $PC = 1 ]; then
+ echo "make oldconfig dep clean bzImage modules"
+else
+ echo "make oldconfig dep clean vmlinux modules"
+fi
+# Back on track
echo ""
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 arch/i386/boot/bzImage $RPM_BUILD_ROOT'"/boot/vmlinuz-$VERSION.$PATCHLEVEL.$SUBLEVEL$EXTRAVERSION"
+# And that's the second
+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, again
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"
echo '#echo -rf $RPM_BUILD_ROOT'
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)