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 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 script create_fpc_tgz_from_local_dir.sh needs as parameter the fpc cvs
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:
@ -49,13 +51,13 @@ RPM:
Creating the fpc and the fpcsrc rpm:
There are two versions of the compiler: the stable 1.0.7 and the unstable
developer version 1.1. 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
There are two versions of the compiler: the stable 1.0.11 and the unstable
developer version 1.9. To build them, you must install fpc first. Install the
stable fpc release (1.0.10). Note: The 1.0.11 can not be built with a 1.9
compiler.
The create_fpc_rpm.sh works nearly automatically. Become root and execute it.
For 1.0.7: ./create_fpc_rpm.sh stable
For 1.1: ./create_fpc_rpm.sh devel
For 1.0.11: ./create_fpc_rpm.sh stable
For 1.9: ./create_fpc_rpm.sh devel
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
@ -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
/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:
@ -77,7 +86,7 @@ Creating the lazarus rpm:
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:
There are two versions of the compiler: the stable 1.0.7 and the unstable
developer version 1.1. 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
There are two versions of the compiler: the stable 1.0.11 and the unstable
developer version 1.9. To build them, you must install fpc first. Install the
stable fpc release (1.0.10). Note: The 1.0.11 can not be built with a 1.9
compiler.
The create_fpc_deb.sh works nearly automatically. Become root and execute it.
For 1.0.7: ./create_fpc_deb.sh stable
For 1.1: ./create_fpc_deb.sh devel
For 1.0.11: ./create_fpc_deb.sh stable
For 1.9: ./create_fpc_deb.sh devel
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

View File

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

View File

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