mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 18:59:10 +02:00
debian package lazarus: can now compile a gtk2 version
git-svn-id: trunk@11474 -
This commit is contained in:
parent
9fde4c29fb
commit
885c836b8a
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -3090,8 +3090,10 @@ tools/install/debian_fpc/changelog.Debian svneol=native#text/plain
|
||||
tools/install/debian_fpc/control svneol=native#text/plain
|
||||
tools/install/debian_fpc/copyright svneol=native#text/plain
|
||||
tools/install/debian_fpc/postinst svneol=native#text/plain
|
||||
tools/install/debian_lazarus/controlgtk2 svneol=native#text/plain
|
||||
tools/install/do_nothing.sh svneol=native#text/plain
|
||||
tools/install/file_filter.sh svneol=native#text/plain
|
||||
tools/install/get_lazarus_revision.sh svneol=native#text/plain
|
||||
tools/install/get_lazarus_version.sh svneol=native#text/plain
|
||||
tools/install/macosx/fpc-release.packproj.template svneol=native#text/plain
|
||||
tools/install/macosx/fpc.packproj.template svneol=native#text/plain
|
||||
|
@ -1,20 +1,39 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Author: Mattias Gaertner
|
||||
#
|
||||
# Usage: ./create_lazarus_deb.sh [gtk2] [release=svn]
|
||||
#
|
||||
# Options:
|
||||
# gtk2 compile IDE and programs for gtk2. gtk1 ppu are built too.
|
||||
# release=svn use svn revision as .deb release tag
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
LCLWidgetset=
|
||||
if [ "$1" = "gtk2" ]; then
|
||||
LCLWidgetset=gtk2
|
||||
shift
|
||||
fi
|
||||
|
||||
LazRelease='0'
|
||||
if [ "$1" = "release=svn" ]; then
|
||||
LazRelease=$(./get_lazarus_revision.sh)
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
echo "Usage: ./create_lazarus_deb.sh [gtk2] [release=svn]"
|
||||
exit
|
||||
fi
|
||||
|
||||
# get FPC version
|
||||
FPCVersion=$(fpc -v | grep 'Compiler version' | sed 's/.*\([0-9]\.[0-9]\.[0-9]\).*/\1/')
|
||||
Arch=$(fpc -v | grep 'Compiler version' | sed 's/.*for \([^ ]\+\)$/\1/')
|
||||
|
||||
# get date of day
|
||||
Year=`date +%y`
|
||||
Month=`date +%m`
|
||||
Day=`date +%d`
|
||||
|
||||
Date=20$Year$Month$Day
|
||||
Date=`date +%Y%m%d`
|
||||
LazVersion=$(./get_lazarus_version.sh)
|
||||
LazRelease='0'
|
||||
SrcTGZ=lazarus-$LazVersion-$LazRelease.tar.gz
|
||||
CurDir=`pwd`
|
||||
TmpDir=/tmp/lazarus$LazVersion
|
||||
@ -73,23 +92,32 @@ MAKEOPTS="-Fl/opt/gnome/lib"
|
||||
if [ -n "$FPCCfg" ]; then
|
||||
MAKEOPTS="$MAKEOPTS -n @$FPCCfg"
|
||||
fi
|
||||
# build for default platform
|
||||
make lcl packager/registration ideintf bigidecomponents OPT="$MAKEOPTS"
|
||||
# build gtk2 .ppu
|
||||
export LCL_PLATFORM=gtk2
|
||||
make lcl packager/registration ideintf bigidecomponents OPT="$MAKEOPTS"
|
||||
export LCL_PLATFORM=
|
||||
# build IDE
|
||||
export LCL_PLATFORM=$LCLWidgetset
|
||||
make bigide OPT="$MAKEOPTS" USESVN2REVISIONINC=0
|
||||
make lazbuilder OPT="$MAKEOPTS"
|
||||
make tools OPT="$MAKEOPTS"
|
||||
# build gtk2 .ppu
|
||||
export LCL_PLATFORM=gtk2
|
||||
make lcl ideintf packager/registration bigidecomponents OPT="$MAKEOPTS"
|
||||
export LCL_PLATFORM=
|
||||
|
||||
strip lazarus
|
||||
strip startlazarus
|
||||
strip lazbuild
|
||||
strip tools/apiwizz/apiwizz
|
||||
strip tools/lazres
|
||||
strip tools/updatepofiles
|
||||
cd -
|
||||
|
||||
# create control file
|
||||
echo "========================================================================="
|
||||
echo "copying control file"
|
||||
mkdir -p $LazBuildDir/DEBIAN
|
||||
cat $DebianSrcDir/control | \
|
||||
cat $DebianSrcDir/control$LCLWidgetset | \
|
||||
sed -e "s/FPCVERSION/$FPCVersion/g" \
|
||||
-e "s/LAZVERSION/$LazVersion/g" \
|
||||
-e "s/ARCH/$Arch/g" \
|
||||
|
13
tools/install/debian_lazarus/controlgtk2
Normal file
13
tools/install/debian_lazarus/controlgtk2
Normal file
@ -0,0 +1,13 @@
|
||||
Source: lazarus
|
||||
Package: lazarus
|
||||
Version: LAZVERSION
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Mattias Gaertner <mattias@freepascal.org>
|
||||
Architecture: ARCH
|
||||
Depends: libgtk2.0-dev (>=2.6.0), fpc (>=FPCVERSION) | fp-compiler (>=FPCVERSION), fpc-src (>=FPCVERSION), fpc (>=FPCVERSION) | fp-ide (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-base (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-db (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-fcl (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-fv (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-gfx (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-gnome1 (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-gtk (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-gtk2 (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-misc (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-net (>=FPCVERSION), fpc (>=FPCVERSION) | fp-units-rtl (>=FPCVERSION), fpc (>=FPCVERSION) | fp-utils (>=FPCVERSION)
|
||||
Description: RAD tool for freepascal
|
||||
Lazarus is a free and opensource IDE and RAD tool for Free Pascal using the
|
||||
Lazarus component library LCL. The LCL is included in this package too.
|
||||
See http://www.lazarus.freepascal.org
|
||||
|
11
tools/install/get_lazarus_revision.sh
Executable file
11
tools/install/get_lazarus_revision.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -f ../svn2revisioninc ]; then
|
||||
make -C ../../lcl
|
||||
make -C ..
|
||||
fi
|
||||
|
||||
../svn2revisioninc -s
|
||||
|
||||
# end.
|
||||
|
@ -1,5 +1,3 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TGenerateSQLForm','FORMDATA',[
|
||||
'TPF0'#16'TGenerateSQLForm'#15'GenerateSQLForm'#4'Left'#3']'#1#6'Height'#3'e'
|
||||
+#1#3'Top'#3#17#1#5'Width'#3'$'#2#18'HorzScrollBar.Page'#3'#'#2#18'VertScroll'
|
||||
|
@ -1,5 +1,3 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TImportDDform','FORMDATA',[
|
||||
'TPF0'#13'TImportDDform'#12'ImportDDform'#4'Left'#3'p'#1#6'Height'#3','#1#3'T'
|
||||
+'op'#3#23#1#5'Width'#3'q'#1#18'HorzScrollBar.Page'#3'p'#1#18'VertScrollBar.P'
|
||||
|
@ -1,5 +1,3 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TMainForm','FORMDATA',[
|
||||
'TPF0'#9'TMainForm'#8'MainForm'#4'Left'#3#15#3#6'Height'#3'v'#1#3'Top'#3#206#0
|
||||
+#5'Width'#3#17#2#18'HorzScrollBar.Page'#3#16#2#18'VertScrollBar.Page'#3'['#1
|
||||
|
@ -1,5 +1,3 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TSQLConnectionForm','FORMDATA',[
|
||||
'TPF0'#18'TSQLConnectionForm'#17'SQLConnectionForm'#4'Left'#3'%'#2#6'Height'#3
|
||||
+#177#0#3'Top'#3#198#1#5'Width'#3':'#1#18'HorzScrollBar.Page'#3'9'#1#18'VertS'
|
||||
|
@ -46,7 +46,7 @@
|
||||
<UnitName Value="lazdde"/>
|
||||
<CursorPos X="60" Y="13"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="181"/>
|
||||
<UsageCount Value="182"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="frmmain.pp"/>
|
||||
@ -56,7 +56,7 @@
|
||||
<UnitName Value="frmmain"/>
|
||||
<CursorPos X="1" Y="19"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="181"/>
|
||||
<UsageCount Value="182"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="dicteditor.pp"/>
|
||||
@ -64,7 +64,7 @@
|
||||
<UnitName Value="dicteditor"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="181"/>
|
||||
<UsageCount Value="182"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="fpdatadict.pp"/>
|
||||
@ -72,7 +72,7 @@
|
||||
<UnitName Value="fpdatadict"/>
|
||||
<CursorPos X="1" Y="9"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="181"/>
|
||||
<UsageCount Value="182"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="inicol.pp"/>
|
||||
@ -87,7 +87,7 @@
|
||||
<UnitName Value="fpddDbf"/>
|
||||
<CursorPos X="1" Y="12"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="170"/>
|
||||
<UsageCount Value="171"/>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
<Filename Value="frmimportdd.pp"/>
|
||||
@ -97,7 +97,7 @@
|
||||
<UnitName Value="frmimportdd"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="166"/>
|
||||
<UsageCount Value="167"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="../../lcl/inipropstorage.pp"/>
|
||||
@ -135,7 +135,7 @@
|
||||
<UnitName Value="frmgeneratesql"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="140"/>
|
||||
<UsageCount Value="141"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="../../fpcsrc/fcl/db/db.pp"/>
|
||||
@ -150,7 +150,7 @@
|
||||
<UnitName Value="fpddsqldb"/>
|
||||
<CursorPos X="1" Y="15"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="126"/>
|
||||
<UsageCount Value="127"/>
|
||||
</Unit13>
|
||||
<Unit14>
|
||||
<Filename Value="../../fpcsrc/fcl/db/sqldb/sqldb.pp"/>
|
||||
@ -167,7 +167,7 @@
|
||||
<UnitName Value="frmSQLConnect"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="124"/>
|
||||
<UsageCount Value="125"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="../../fpcsrc/fcl/db/sqldb/interbase/ibconnection.pp"/>
|
||||
@ -229,10 +229,10 @@
|
||||
<Filename Value="ddfiles.pp"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ddfiles"/>
|
||||
<CursorPos X="52" Y="21"/>
|
||||
<CursorPos X="13" Y="18"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="88"/>
|
||||
<UsageCount Value="89"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit24>
|
||||
<Unit25>
|
||||
@ -262,7 +262,9 @@
|
||||
<UnitName Value="conneditor"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="83"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="84"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
<Filename Value="../../../../../../michael/projects/lazarus/components/sqldb/registersqldb.pp"/>
|
||||
@ -290,7 +292,7 @@
|
||||
<UnitName Value="datapanel"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="40"/>
|
||||
<UsageCount Value="41"/>
|
||||
</Unit32>
|
||||
<Unit33>
|
||||
<Filename Value="../../../../../../michael/lazarus/lcl/dbctrls.pp"/>
|
||||
@ -305,7 +307,7 @@
|
||||
<UnitName Value="querypanel"/>
|
||||
<CursorPos X="1" Y="12"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="37"/>
|
||||
<UsageCount Value="38"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="../../../../../../michael/lazarus/components/synedit/synedithighlighter.pp"/>
|
||||
@ -419,12 +421,7 @@
|
||||
<UsageCount Value="10"/>
|
||||
</Unit51>
|
||||
</Units>
|
||||
<JumpHistory Count="1" HistoryIndex="0">
|
||||
<Position1>
|
||||
<Filename Value="ddfiles.pp"/>
|
||||
<Caret Line="18" Column="1" TopLine="1"/>
|
||||
</Position1>
|
||||
</JumpHistory>
|
||||
<JumpHistory Count="0" HistoryIndex="-1"/>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<PathDelim Value="\"/>
|
||||
<PathDelim Value="/"/>
|
||||
<Version Value="5"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
@ -17,8 +17,8 @@
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
<CommandLineParams Value=". ..\ide\revision.inc"/>
|
||||
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||
<CommandLineParams Value=". ../ide/revision.inc"/>
|
||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
@ -39,7 +39,6 @@
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="5"/>
|
||||
<PathDelim Value="\"/>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Generate Value="Faster"/>
|
||||
|
@ -60,6 +60,7 @@ type
|
||||
RevisionStr: string;
|
||||
ConstName: string;
|
||||
Verbose: boolean;
|
||||
UseStdOut: boolean;
|
||||
|
||||
function FindRevision: boolean;
|
||||
function IsValidRevisionInc: boolean;
|
||||
@ -109,7 +110,7 @@ var
|
||||
Result:=true;
|
||||
Show('Retrieved revision with svnversion.');
|
||||
Show('');
|
||||
Show('svnversion output:');
|
||||
Show('svnversion error:');
|
||||
Show(Copy(Buffer, 1, n));
|
||||
Show('');
|
||||
except
|
||||
@ -246,6 +247,7 @@ begin
|
||||
writeln('Options:');
|
||||
writeln(' --o Output file');
|
||||
writeln(' --c=<name> Name of constant (default RevisionStr)');
|
||||
writeln(' --s write revision to stdout, do not create inc file');
|
||||
writeln(' --v Be more verbose');
|
||||
writeln(' --h This help screen');
|
||||
writeln;
|
||||
@ -292,6 +294,9 @@ begin
|
||||
if HasOption('v') then
|
||||
Verbose := True;
|
||||
|
||||
if HasOption('s') then
|
||||
UseStdOut := True;
|
||||
|
||||
if HasOption('c') then
|
||||
ConstName := GetOptionValue('c');
|
||||
|
||||
@ -312,7 +317,7 @@ begin
|
||||
end;
|
||||
|
||||
RevisionIncDirName:=ExtractFilePath(ExpandFileName(RevisionIncFileName));
|
||||
if not DirectoryExists(RevisionIncDirName) then begin
|
||||
if (not UseStdOut) and (not DirectoryExists(RevisionIncDirName)) then begin
|
||||
writeln('Error: Target Directory "', RevisionIncDirName, '" doesn''t exist.');
|
||||
exit;
|
||||
end;
|
||||
@ -352,8 +357,14 @@ begin
|
||||
|
||||
if not CanCreateRevisionInc then exit;
|
||||
|
||||
if FindRevision or not IsValidRevisionInc then
|
||||
WriteRevisionInc;
|
||||
if FindRevision then begin
|
||||
if UseStdOut then begin
|
||||
writeln(RevisionStr);
|
||||
end else begin
|
||||
if not IsValidRevisionInc then
|
||||
WriteRevisionInc;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user