rpm: fpc_crosswin32: updated for 2.2.2

git-svn-id: trunk@16869 -
This commit is contained in:
mattias 2008-10-04 12:45:26 +00:00
parent 8c3ef8f770
commit fce2a78da2
2 changed files with 6 additions and 13 deletions

View File

@ -2,7 +2,9 @@ How to create the fpc_crosswin32 rpm
This rpm was only tested under linux. This rpm was only tested under linux.
For configuration see below. The base directory is $BuildRoot. Default value is ~/freepascal
To change it use for example:
[]$ export BuildRoot=/home/user/freepascal
First get the FPC sources and the binutils. First get the FPC sources and the binutils.
@ -27,10 +29,3 @@ Then build the fpc_crosswin32 rpm and install it:
Now you can cross compile from linux to win32. Now you can cross compile from linux to win32.
================================================================================
The following environment variables are handled:
The base directory BuildRoot. Default value is ~/freepascal
[]$ export BuildRoot=/home/user/freepascal

View File

@ -110,7 +110,7 @@ if [ $BuildCrossWin32RPM = "yes" ]; then
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# create temporary directory # create temporary directory
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
TmpSrcDir=/tmp/fpc_crosswin32 TmpSrcDir=$HOME/tmp/fpc_crosswin32
echo "create temporary directory $TmpSrcDir ..." echo "create temporary directory $TmpSrcDir ..."
rm -rf $TmpSrcDir rm -rf $TmpSrcDir
mkdir -p $TmpSrcDir mkdir -p $TmpSrcDir
@ -139,9 +139,7 @@ if [ $BuildCrossWin32RPM = "yes" ]; then
cd ${BinUtilsDir} cd ${BinUtilsDir}
for binutility in $(ls -B ${BinUtilsPrefix}*); do for binutility in $(ls -B ${BinUtilsPrefix}*); do
NewName=$(echo $binutility | sed -e "s#^$BinUtilsPrefix##") NewName=$(echo $binutility | sed -e "s#^$BinUtilsPrefix##")
if [ ! $NewName = "windres" ]; then
NewName="fpc-${TargetCPU}-${TargetOS}-$NewName" NewName="fpc-${TargetCPU}-${TargetOS}-$NewName"
fi
cp ${BinUtilsDir}${binutility} ${BinDir}${NewName} cp ${BinUtilsDir}${binutility} ${BinDir}${NewName}
done done
cd - cd -
@ -167,7 +165,7 @@ if [ $BuildCrossWin32RPM = "yes" ]; then
# copy tools (windres) # copy tools (windres)
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
FPCLibDir=lib/fpc/$CompilerVersionStr # !!! no / at end FPCLibDir=lib/fpc/$CompilerVersionStr # !!! no / at end
DestDir=$FPCBuildDir/usr/$FPCLibDir DestDir=$TmpSrcDir/$FPCLibDir
cp -p $BuildRoot/bin/* $DestDir/ cp -p $BuildRoot/bin/* $DestDir/
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------