rpm scripts: added heuristic to find target_cpu

git-svn-id: trunk@12820 -
This commit is contained in:
mattias 2007-11-11 00:05:50 +00:00
parent 69c3702ccf
commit 1edf510a8a
2 changed files with 11 additions and 2 deletions

View File

@ -78,6 +78,10 @@ if [ "$CompilerPatch" != "0" ]; then
fi fi
echo " $CompilerVersionStr-$FPCRelease" echo " $CompilerVersionStr-$FPCRelease"
Arch=i386
if [ -f /etc/rpm/platform ]; then
Arch=$(cat /etc/rpm/platform | sed -e 's/-.*//')
fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -163,7 +167,7 @@ else
fi fi
rpmbuild --nodeps -ba $SpecFile rpmbuild --nodeps -ba $SpecFile
echo "The new rpm can be found in $(./rpm/get_rpm_source_dir.sh)/RPMS/i386/fpc-$FPCVersion-$FPCRelease.i386.rpm" echo "The new rpm can be found in $(./rpm/get_rpm_source_dir.sh)/RPMS/$Arch/fpc-$FPCVersion-$FPCRelease.$Arch.rpm"
fi fi
# end. # end.

View File

@ -27,6 +27,11 @@ SrcTGZ=$(./rpm/get_rpm_source_dir.sh)/SOURCES/$Src
TmpDir=/tmp/lazarus$LazVersion TmpDir=/tmp/lazarus$LazVersion
SpecFile=rpm/lazarus-$LazVersion-$LazRelease.spec SpecFile=rpm/lazarus-$LazVersion-$LazRelease.spec
Arch=i386
if [ -f /etc/rpm/platform ]; then
Arch=$(cat /etc/rpm/platform | sed -e 's/-.*//')
fi
# download lazarus svn if needed # download lazarus svn if needed
echo "creating lazarus tgz ..." echo "creating lazarus tgz ..."
#if [ ! -f $SrcTGZ ]; then #if [ ! -f $SrcTGZ ]; then
@ -48,7 +53,7 @@ cat rpm/lazarus.spec.template | \
echo "building rpm ..." echo "building rpm ..."
rpm -ba $SpecFile || rpmbuild -ba $SpecFile rpm -ba $SpecFile || rpmbuild -ba $SpecFile
echo "The new rpm can be found at $(./rpm/get_rpm_source_dir.sh)/RPMS/i386/lazarus-$LazVersion-$LazRelease.i386.rpm" echo "The new rpm can be found at $(./rpm/get_rpm_source_dir.sh)/RPMS/$Arch/lazarus-$LazVersion-$LazRelease.$Arch.rpm"
# end. # end.