Panu Matilainen 3fd553
Hackery to get secondary arch macros included on x86_64...
Panu Matilainen 3fd553
Panu Matilainen 3fd553
diff -r 8004da6eac95 installplatform
Panu Matilainen 3fd553
--- a/installplatform	Thu Nov 08 15:59:45 2007 +0200
Panu Matilainen 3fd553
+++ b/installplatform	Mon Nov 12 16:16:31 2007 +0200
Panu Matilainen 3fd553
@@ -20,7 +20,7 @@ E_O_F
Panu Matilainen 3fd553
 
Panu Matilainen 3fd553
 RPM="./rpm --rcfile=$TEMPRC --macros=$MACROS"
Panu Matilainen 3fd553
 
Panu Matilainen 3fd553
-canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_'
Panu Matilainen 3fd553
+canonarch_sed='s_i.86_i386_;s_pentium[34]_i386_;s_athlon_i386_;s_sparc[^-]*_sparc_;s_alpha[^-]*_alpha_;s_arm[^-]*_arm_;s_\(powerpc\|ppc\)[^-]*_ppc_;s,\(ia32e\|amd64\),x86_64,'
Panu Matilainen 3fd553
 arch="`$RPM --eval '%{_arch}'|sed -e "$canonarch_sed"`"
Panu Matilainen 3fd553
 VENDOR="`$RPM --eval '%{_vendor}'`"
Panu Matilainen 3fd553
 OS="`$RPM --eval '%{_os}'`"
Panu Matilainen 3fd553
@@ -35,7 +35,7 @@ case "$arch" in
Panu Matilainen 3fd553
   sparc*) SUBSTS='s_sparc\(64\|64v\|v9v\|v9\)_sparc_ s_sparc64_sparcv9_;s_sparc\([^v]\|$\)_sparcv9\1_ s_sparcv9_sparc64_;s_sparc\([^6]\|$\)_sparc64\1_' ;;
Panu Matilainen 3fd553
   powerpc*|ppc*) SUBSTS='s_ppc64_ppc_ s_ppc\([^6ip]\|$\)_ppc64\1_ s_ppc\([^6ip]\|$\)_ppciseries_ s_ppc\([^6ip]\|$\)_ppcpseries_ s_ppc\([^6ip]\|$\)_ppc64iseries_ s_ppc\([^6ip]\|$\)_ppc64pseries_' ;;
Panu Matilainen 3fd553
   s390*) SUBSTS='s_s390x_s390_ s_s390\([^x]\|$\)_s390x\1_' ;;
Panu Matilainen 3fd553
-  x86_64|amd64|ia32e) SUBSTS='s,x86_64,x86_64, s,x86_64,ia32e, s,x86_64,amd64,' ;;
Panu Matilainen 3fd553
+  x86_64|amd64|ia32e) SUBSTS='s,x86_64,x86_64, s,x86_64,ia32e, s,x86_64,amd64, s,x86_64,i386, s,x86_64,i486, s,x86_64,i586, s,x86_64,i686, s,x86_64,pentium3, s,x86_64,pentium4, s,x86_64,athlon,' ;;
Panu Matilainen 3fd553
   *) SUBSTS=y___ ;;
Panu Matilainen 3fd553
 esac
Panu Matilainen 3fd553
 
Panu Matilainen 3fd553
@@ -102,9 +102,11 @@ for SUBST in $SUBSTS ; do
Panu Matilainen 3fd553
     ;;
Panu Matilainen 3fd553
   esac
Panu Matilainen 3fd553
 
Panu Matilainen 3fd553
+  CANONARCH="`echo $ARCH|sed -e "$canonarch_sed"`"
Panu Matilainen 3fd553
+
Panu Matilainen 3fd553
   cat $PLATFORM \
Panu Matilainen 3fd553
   | sed -e "s,@RPMRC_OPTFLAGS@,$RPMRC_OPTFLAGS," \
Panu Matilainen 3fd553
-	-e "s,@RPMRC_ARCH@,$ARCH," \
Panu Matilainen 3fd553
+	-e "s,$arch,$CANONARCH," \
Panu Matilainen 3fd553
 	-e "s,@RPMRC_GNU@,$RPMRC_GNU," \
Panu Matilainen 3fd553
 	-e "s,@LIB@,$LIB," \
Panu Matilainen 3fd553
 	-e "s,@ARCH_INSTALL_POST@,$ARCH_INSTALL_POST," \