improved rpm building and added support for 1.0.7

git-svn-id: trunk@3939 -
This commit is contained in:
mattias 2003-03-16 13:47:45 +00:00
parent 309a9b60c5
commit a68ac94f4f
6 changed files with 30 additions and 132 deletions

2
.gitattributes vendored
View File

@ -826,9 +826,7 @@ tools/apiwizz/apiwizard.pp svneol=native#text/pascal
tools/apiwizz/apiwizz.pp svneol=native#text/pascal
tools/install/create_fpc_export_tgz.sh -text svneol=native#application/x-sh
tools/install/create_fpc_rpm.sh -text svneol=native#application/x-sh
tools/install/create_fpc_snapshot_tgz.sh -text svneol=native#application/x-sh
tools/install/create_fpc_tgz_from_local_dir.sh -text svneol=native#application/x-sh
tools/install/create_fpcsrc-1.1_rpm.sh -text svneol=native#application/x-sh
tools/install/create_fpcsrc_deb.sh -text svneol=native#application/x-sh
tools/install/create_lazarus_deb.sh -text svneol=native#application/x-sh
tools/install/create_lazarus_snapshot_tgz.sh -text svneol=native#application/x-sh

View File

@ -1730,6 +1730,12 @@ const
type
TShortCut = Low(Word)..High(Word); {should be moved to classes}
{$IFDEF VER1_1}
type
TRTLCriticalSection = pointer;
{$ENDIF}
function hiword(i: integer): word;
function loword(i: integer): word;
Function Char2VK(C : Char) : Word;
@ -1791,6 +1797,9 @@ end.
{
$Log$
Revision 1.34 2003/03/16 13:47:45 mattias
improved rpm building and added support for 1.0.7
Revision 1.33 2003/02/28 19:54:05 mattias
added ShowWindow

View File

@ -49,62 +49,21 @@ Creating the lazarus tgz:
RPM:
Creating the fpc rpm:
Creating the fpc and the fpcsrc rpm:
fpc 1.0.7:
ToDo: write a script for this
As a user of your choice:
Install the latest fpc package you can get. You will need it to compile the
compiler itself. Then download the fpc cvs of the FIXES_1_0_0 branch and
compile the RTL and the compiler with 'make rtl' and 'make compiler'.
Before you create the rpm, you should define a release tag. Open
<fpc>/install/fpc.spec and change the Release tag to laz.20030307. The number
is simply the date, when this README was written. Use the current date.
The default fpc.cfg is created with the samplecfg script. This is done with a
fixed fpc version. To create a fpc.cfg, that can be used with the fpc 1.1 and
with fpc 1.0.x you should change the samplecfg call in <fpc>/install/fpc.spec:
Search for 'samplecfg' and change the line:
%{fpcdir}/samplecfg %{_libdir}/fpc/\$version
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
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
As root:
The fpc and fpcdoc RPMs can be created with 'make rpm'. If you only want to
create the fpc RPM, then use 'make rpm NODOCS=1'.
The RPMs are normally created under /usr/src/redhat/RPMS/i386/
fpc 1.1:
Warning: the fpc 1.1 is unstable.
Install the latest fpc package you can get. You will need it to compile the
compiler itself.
The create_fpc-1.1_rpm.sh works nearly automatically. Become root and
execute it. First it checks if the fpc source tgz is already created and
if not, it automatically downloads it. Due to the unstability of 1.1, the
script does not use the current version, but the latest known to work with
lazarus. Then it unpacks the source, compiles it and builds the rpm.
Normally you can find the rpms under
/usr/src/redhat/RPMS/i386/ and /usr/src/redhat/SRPMS/.
Creating the fpcsrc rpm:
fpc 1.0.7:
As a user of your choice:
Create the fpcsrc-1.0.7-1.tgz of 'Creating the fpcsrc tgz'.
As root:
Put the fpcsrc-1.0.7-1.tgz into /usr/src/redhat/SOURCES/.
Run 'rpm -ba fpcsrc-1.0.7-1.spec'. This will create the src rpm and the rpm
for the current system (e.g. redhat 7.3).
fpc 1.1:
As root execute create_fpcsrc-1.1_rpm.sh
The src rpm can be used to create rpms for any system by building it on the
destination system.
The fpcsrc rpm will simply copy the files into /usr/share/fpcsrc. It does
not contain any binaries, so the rpm is system independent. The lazarus
IDE searches the fpc src automatically in /usr/share/fpcsrc and so the user
does not need to setup this path.
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
version, but the latest known to work with lazarus. Then it unpacks the
source, compiles it and builds the rpm. Normally you can find the rpms under
/usr/src/redhat/RPMS/i386/ and /usr/src/redhat/SRPMS/.
Creating the lazarus rpm:

View File

@ -1,36 +0,0 @@
#!/bin/bash
#set -x
set -e
OutputFile=$1
shift
CVSParams=$@
Usage="$0 outputfilename [cvs params]"
if [ "x$OutputFile" = "x" ]; then
echo $Usage
exit
fi
if [ "x$CVSParams" = "x" ]; then
CVSParams="-r FIXES_1_0_0"
fi
echo downloading cvs $CVSParams ...
cd /tmp
rm -rf /tmp/fpc
export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
echo "The password is: cvs"
cvs login
cvs -z3 export $CVSParams fpc
# pack
echo "creating tgz ..."
tar czf fpc_src.tgz fpc
cd -
mv /tmp/fpc_src.tgz $OutputFile
rm -rf /tmp/fpc
# end.

View File

@ -1,34 +0,0 @@
#!/bin/bash
set -x
set -e
Year=02
Month=12
Day=25
Date=20$Year$Month$Day
LazVersion=1.1
LazRelease=laz.$Date
SrcTGZ=fpcsrc-$LazVersion-$LazRelease.tgz
SpecFile=fpcsrc-$LazVersion-$LazRelease.spec
# download fpc cvs if necessary
if [ ! -f $SrcTGZ ]; then
./create_fpc_snapshot_tgz.sh $SrcTGZ -D $Month/$Day/$Year
fi
# copy src tgz into building directory
cp $SrcTGZ /usr/src/redhat/SOURCES/
# create spec file
cat fpcsrc.spec | \
sed -e "s/LAZVERSION/$LazVersion/g" -e "s/LAZRELEASE/$LazRelease/" \
> $SpecFile
# build rpm
rpm -ba $SpecFile
# end.

View File

@ -7,7 +7,9 @@ Source: %{name}-%{version}-%{release}.tgz
Summary: FreePascal sources
Packager: Mattias Gaertner (mattias@freepascal.org)
URL: http://www.freepascal.org/
BuildRoot: %{_tmppath}/fpcsrc-build
BuildRoot: %{_tmppath}/fpcsrc-build%{version}
%define fpcsrcdir %{_datadir}/fpcsrc
%description
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
@ -27,19 +29,19 @@ bindings and many more.
%install
if [ %{buildroot} != "/" ]; then
rm -rf %{buildroot}
rm -rf %{buildroot}
fi
mkdir -p %{buildroot}%{_datadir}/fpcsrc
cp -a fpc/* %{buildroot}%{_datadir}/fpcsrc/
mkdir -p %{buildroot}%{fpcsrc}
cp -a fpc/* %{buildroot}%{fpcsrc}/
%clean
if [ %{buildroot} != "/" ]; then
rm -rf %{buildroot}
rm -rf %{buildroot}
fi
%files
%defattr(-,root,root)
%{_datadir}/fpcsrc
%{fpcsrc}
%changelog