fixed rpm building script build_fpc_rpm.sh

git-svn-id: trunk@5439 -
This commit is contained in:
mattias 2004-05-01 11:57:19 +00:00
parent 3742bf6d3a
commit 4a730f7f7c
3 changed files with 62 additions and 38 deletions

View File

@ -17,14 +17,16 @@ Creating the fpcsrc tgz:
The download and pack script: The download and pack script:
The script create_fpc_export_tgz.sh makes a cvs export of the fpc. The script create_fpc_export_tgz.sh makes a cvs export of the fpc.
For 1.0.7: ./create_fpc_export_tgz.sh stable 03/01/03 For 1.0.11: ./create_fpc_export_tgz.sh stable 05/01/04
For 1.1: ./create_fpc_export_tgz.sh devel 12/25/02 For 1.9: ./create_fpc_export_tgz.sh devel 05/01/04
The 05/01/04 means may 1 2004.
The copy and pack script: The copy and pack script:
The script create_fpc_tgz_from_local_dir.sh needs as parameter the fpc cvs The script create_fpc_tgz_from_local_dir.sh needs as parameter the fpc cvs
directory and compress it to a tgz. For example directory and compress it to a tgz. For example
./create_fpc_tgz_from_local_dir.sh ~/pascal/fpc fpc-1.0.7.tgz ./create_fpc_tgz_from_local_dir.sh ~/pascal/fpc fpc-1.0.10.tgz
Creating the lazarus tgz: Creating the lazarus tgz:
@ -49,13 +51,13 @@ RPM:
Creating the fpc and the fpcsrc rpm: Creating the fpc and the fpcsrc rpm:
There are two versions of the compiler: the stable 1.0.7 and the unstable There are two versions of the compiler: the stable 1.0.11 and the unstable
developer version 1.1. To build them, you must install fpc first. Install the developer version 1.9. To build them, you must install fpc first. Install the
latest fpc package you can get. Note: The 1.0.7 can not be built with a 1.1 stable fpc release (1.0.10). Note: The 1.0.11 can not be built with a 1.9
compiler. compiler.
The create_fpc_rpm.sh works nearly automatically. Become root and execute it. The create_fpc_rpm.sh works nearly automatically. Become root and execute it.
For 1.0.7: ./create_fpc_rpm.sh stable For 1.0.11: ./create_fpc_rpm.sh stable
For 1.1: ./create_fpc_rpm.sh devel For 1.9: ./create_fpc_rpm.sh devel
What it does: First it checks if the fpc source tgz is already created and What it does: First it checks if the fpc source tgz is already created and
if not, it automatically downloads it. The script does not use the current if not, it automatically downloads it. The script does not use the current
@ -63,6 +65,13 @@ Creating the fpc and the fpcsrc rpm:
source, compiles it and builds the rpm. Normally you can find the rpms under source, compiles it and builds the rpm. Normally you can find the rpms under
/usr/src/redhat/RPMS/i386/ and /usr/src/redhat/SRPMS/. /usr/src/redhat/RPMS/i386/ and /usr/src/redhat/SRPMS/.
If you have your own fpc sources you can build the rpm with:
Become root and do:
cd <lazarus_directory>/tools/install
./build_fpc_rpm.sh nodocs /home/mattias/pascal/fpc_sources/new19/fpc 040501
The 040501 stands for: 2004 may 1
Creating the lazarus rpm: Creating the lazarus rpm:
@ -77,7 +86,7 @@ Creating the lazarus rpm:
Creating other system specific rpms: Creating other system specific rpms:
rpm --rebuild lazarus-0.8.5-1.src.rpm rpm --rebuild lazarus-0.9.1-1.src.rpm
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
@ -86,13 +95,13 @@ Debian:
Creating the debian fpc and fpcsrc packages: Creating the debian fpc and fpcsrc packages:
There are two versions of the compiler: the stable 1.0.7 and the unstable There are two versions of the compiler: the stable 1.0.11 and the unstable
developer version 1.1. To build them, you must install fpc first. Install the developer version 1.9. To build them, you must install fpc first. Install the
latest fpc package you can get. Note: The 1.0.7 can not be built with a 1.1 stable fpc release (1.0.10). Note: The 1.0.11 can not be built with a 1.9
compiler. compiler.
The create_fpc_deb.sh works nearly automatically. Become root and execute it. The create_fpc_deb.sh works nearly automatically. Become root and execute it.
For 1.0.7: ./create_fpc_deb.sh stable For 1.0.11: ./create_fpc_deb.sh stable
For 1.1: ./create_fpc_deb.sh devel For 1.9: ./create_fpc_deb.sh devel
What it does: First it checks if the fpc source tgz is already created and What it does: First it checks if the fpc source tgz is already created and
if not, it automatically downloads it. The script does not use the current if not, it automatically downloads it. The script does not use the current

View File

@ -3,7 +3,6 @@
set -x set -x
set -e set -e
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# parse parameters # parse parameters
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
@ -66,6 +65,16 @@ if [ "$CompilerPatch" != "0" ]; then
fi fi
#------------------------------------------------------------------------------
# patch sources
FPCMakefile=$TmpDir/Makefile
SmartStripScript=smart_strip.sh
# update smart_strip.sh
cp $SmartStripScript $TmpDir/install/
if [ "$PkgType" = "deb" ]; then if [ "$PkgType" = "deb" ]; then
# build fpc debs # build fpc debs
@ -115,9 +124,13 @@ else
SpecFile=$TmpDir/install/fpc.spec SpecFile=$TmpDir/install/fpc.spec
SrcPatch=fpcsrc-patch SrcPatch=fpcsrc-patch
SmartSripScript=smart_strip.sh
# patch sources # patch sources -> This should eventually go to the fpc cvs
patch -l -p2 -d $TmpDir/ -i $SrcPatch # update smart_strip.sh
cp $SmartSripScript $TmpDir/install/
#patch -l -p2 -d $TmpDir/ -i $SrcPatch
# change spec file # change spec file
cat $SpecFile | \ cat $SpecFile | \
@ -127,28 +140,30 @@ else
# -e 's/\(%define builddocdir.*\)/%define __strip smart_strip.sh\n\n\1/' \ # -e 's/\(%define builddocdir.*\)/%define __strip smart_strip.sh\n\n\1/' \
# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \ # -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \
mv $SpecFile.New $SpecFile mv $SpecFile.New $SpecFile
if [ "$WithDOCS" = "no" ]; then #if [ "$WithDOCS" = "no" ]; then
cat $SpecFile | \ #cat $SpecFile | \
sed -e 's/^\(.*\bmake\b.*\bdocs\b\)/#\1/g' \ # sed -e 's/^\(.*\bmake\b.*\bdocs\b\)/#\1/g' \
-e 's/^\(%doc.*\*\.pdf\)/#\1/g' \ # -e 's/^\(%doc.*\*\.pdf\)/#\1/g' \
> $SpecFile.New #> $SpecFile.New
mv $SpecFile.New $SpecFile #mv $SpecFile.New $SpecFile
fi #fi
# add smart_strip.sh
#cp smart_strip.sh $TmpDir
# change Makefile for new rpmbuild, if not already done # change Makefile for new rpmbuild, if not already done
cd $TmpDir cd $TmpDir
if [ -n `grep rpmbuild Makefile` ]; then if [ -n `grep -q rpmbuild Makefile` ]; then
cat Makefile | \ cat Makefile | \
sed -e 's/rpm\( --nodeps -ba .*\)$/rpm\1 || rpmbuild\1/g' \ sed -e 's/rpm\( --nodeps -ba .*\)$/rpm\1 || rpmbuild\1/g' \
> New.Makefile > New.Makefile
mv New.Makefile Makefile mv New.Makefile Makefile
fi fi
cd - cd -
exit # fix fpc.spec bug: smart_strip.sh is searched at wrong location
SmartStripWhileBuild="/usr/src/redhat/BUILD/fpc-$CompilerVersion.$CompilerRelease.$CompilerPatch/smart_strip.sh"
cat $SpecFile | \
sed -e 's# %{buildroot}/smart_strip.sh# '"$SmartStripWhileBuild"'#' \
> $SpecFile.New
mv $SpecFile.New $SpecFile
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
# compile # compile

View File

@ -41,16 +41,16 @@ fi
# set here the fpc cvs dates for the various versions # set here the fpc cvs dates for the various versions
if [ "x$FPCVersion" = "xdevel" ]; then if [ "x$FPCVersion" = "xdevel" ]; then
Year=03 Year=04
Month=06 Month=05
Day=24 Day=01
LazVersion=1.1 LazVersion=1.9.3
fi fi
if [ "x$FPCVersion" = "xstable" ]; then if [ "x$FPCVersion" = "xstable" ]; then
Year=03 Year=04
Month=07 Month=05
Day=11 Day=01
LazVersion=1.0.10 LazVersion=1.0.11
fi fi
Date=20$Year$Month$Day Date=20$Year$Month$Day