mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 14:38:01 +02:00
debian package creation script: extended to support amd64, powerpc and sparc from Peter Mugaas
git-svn-id: trunk@11020 -
This commit is contained in:
parent
383d48a263
commit
cfd297adf3
@ -285,7 +285,7 @@ type
|
||||
private
|
||||
FAllowAllUp: Boolean;
|
||||
FDown: Boolean;
|
||||
FDownBuffered : Boolean;//buffered value of FDown
|
||||
FDownLoaded : Boolean;// value of Down set during loading
|
||||
FDragging: Boolean;
|
||||
FFlat: Boolean;
|
||||
FGlyph: TButtonGlyph;
|
||||
|
@ -136,7 +136,7 @@ begin
|
||||
//since Down needs GroupIndex, then we need to wait that all properties
|
||||
//loaded before we continue
|
||||
if (csLoading in ComponentState) then begin
|
||||
FDownBuffered := Value;
|
||||
FDownLoaded := Value;
|
||||
exit;
|
||||
end else begin
|
||||
if FGroupIndex = 0 then Value:= false;
|
||||
@ -762,7 +762,7 @@ procedure TCustomSpeedButton.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
UpdateExclusive;
|
||||
if FDownBuffered then SetDown(FDownBuffered);
|
||||
if FDownLoaded then SetDown(FDownLoaded);
|
||||
end;
|
||||
|
||||
function TCustomSpeedButton.GetGlyphSize(PaintRect: TRect): TSize;
|
||||
|
@ -103,12 +103,33 @@ else
|
||||
TmpDir=$FPCSrcDir
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# architecture dependent stuff
|
||||
|
||||
Arch=`dpkg --print-architecture`
|
||||
if [ "$Arch" = i386 ]; then
|
||||
ppcbin=ppc386
|
||||
else
|
||||
if [ "$Arch" = amd64 ]; then
|
||||
ppcbin=ppcx64
|
||||
else
|
||||
if [ "$Arch" = powerpc ]; then
|
||||
ppcbin=ppcppc
|
||||
else
|
||||
if [ "$Arch" = sparc ]; then
|
||||
ppcbin=ppcsparc
|
||||
else
|
||||
echo "$Arch is not supported."
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# setup variables
|
||||
|
||||
CurDir=`pwd`
|
||||
Arch=i386
|
||||
FPCBuildDir=$TmpDir/fpc_build
|
||||
FPCDeb=$CurDir/${PackageName}_$FPCVersion-${FPCRelease}_$Arch.deb
|
||||
ResourceDir=$CurDir/debian_$PackageName
|
||||
@ -138,8 +159,8 @@ mkdir -p $DebianRulezDir
|
||||
|
||||
# create debian control file, which contains the package description
|
||||
echo "creating DEBIAN/control file"
|
||||
cat $ResourceDir/control | sed -e "s/FPCVERSION/$FPCVersion/g" > $DebianRulezDir/control
|
||||
|
||||
cat $ResourceDir/control | sed -e "s/FPCVERSION/$FPCVersion/g" \
|
||||
-e "s/ARCH/$Arch/g" > $DebianRulezDir/control
|
||||
# create debian changelog file, needed for version
|
||||
echo "creating usr/share/doc/fpc/changelog file ..."
|
||||
File=$DebianDocDir/changelog
|
||||
@ -154,7 +175,8 @@ gzip --best $File
|
||||
# create postinst if needed
|
||||
if [ -f "$ResourceDir/postinst" ]; then
|
||||
echo "creating DEBIAN/postinst file"
|
||||
cat $ResourceDir/postinst | sed -e "s/FPCVERSION/$FPCVersion/g" > $DebianRulezDir/postinst
|
||||
cat $ResourceDir/postinst | sed -e "s/FPCVERSION/$FPCVersion/g" \
|
||||
-e "s/PPCBIN/$ppcbin/g" > $DebianRulezDir/postinst
|
||||
chmod a+x $DebianRulezDir/postinst
|
||||
fi
|
||||
|
||||
|
@ -23,7 +23,28 @@ LazDeb=$CurDir/lazarus_${LazVersion}-${LazRelease}_$Arch.deb
|
||||
DebianSrcDir=$CurDir/debian_lazarus
|
||||
LazDestDir=$LazBuildDir/usr/share/lazarus
|
||||
LazDestDirInstalled=/usr/share/lazarus
|
||||
FPCVersion=$(ppc386 -v | grep version| sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')
|
||||
|
||||
Arch=`dpkg --print-architecture`
|
||||
if [ "$Arch" = i386 ]; then
|
||||
ppcbin=ppc386
|
||||
else
|
||||
if [ "$Arch" = amd64 ]; then
|
||||
ppcbin=ppcx64
|
||||
else
|
||||
if [ "$Arch" = powerpc ]; then
|
||||
ppcbin=ppcppc
|
||||
else
|
||||
if [ "$Arch" = sparc ]; then
|
||||
ppcbin=ppcsparc
|
||||
else
|
||||
echo "$Arch is not supported."
|
||||
exit -1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
FPCVersion=$($ppcbin -v | grep version| sed 's/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/')
|
||||
ChangeLogDate=`date --rfc-822`
|
||||
|
||||
# download/export lazarus svn if needed
|
||||
@ -71,6 +92,7 @@ mkdir -p $LazBuildDir/DEBIAN
|
||||
cat $DebianSrcDir/control | \
|
||||
sed -e "s/FPCVERSION/$FPCVersion/g" \
|
||||
-e "s/LAZVERSION/$LazVersion/g" \
|
||||
-e "s/ARCH/$Arch/g" \
|
||||
> $LazBuildDir/DEBIAN/control
|
||||
|
||||
# copyright and changelog files
|
||||
|
@ -3,7 +3,7 @@ Version: FPCVERSION
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Mattias Gaertner <mattias@cvs.freepascal.org>
|
||||
Architecture: i386
|
||||
Architecture: ARCH
|
||||
Description: Free Pascal Sources
|
||||
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible
|
||||
32/64bit Object Pascal Compiler. It comes with fully TP 7.0
|
||||
|
@ -3,7 +3,7 @@ Version: FPCVERSION
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Mattias Gaertner <mattias@cvs.freepascal.org>
|
||||
Architecture: i386
|
||||
Architecture: ARCH
|
||||
Pre-Depends: binutils
|
||||
Replaces: fp-compiler, fp-utils, fp-ide, fp-units-rtl, fp-units-base, fp-units-fcl, fp-units-fv, fp-units-gtk, fp-units-gtk2, fp-units-gnome1, fp-units-db, fp-units-gfx, fp-units-net, fp-units-misc
|
||||
Description: Free Pascal Compiler
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
ln -s /usr/lib/fpc/FPCVERSION/ppc386 /usr/bin/ppc386
|
||||
ln -s /usr/lib/fpc/FPCVERSION/PPCBIN /usr/bin/PPCBIN
|
||||
sh /usr/lib/fpc/FPCVERSION/samplecfg /usr/lib/fpc/\$fpcversion/ /etc
|
||||
|
||||
|
@ -4,8 +4,8 @@ Version: LAZVERSION
|
||||
Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Mattias Gaertner <mattias@freepascal.org>
|
||||
Architecture: i386
|
||||
Depends: fp-compiler (>=FPCVERSION), fpc-src (>=FPCVERSION), fp-ide (>=FPCVERSION), fp-units-base (>=FPCVERSION), fp-units-db (>=FPCVERSION), fp-units-fcl (>=FPCVERSION), fp-units-fv (>=FPCVERSION), fp-units-gfx (>=FPCVERSION), fp-units-gnome1 (>=FPCVERSION), fp-units-gtk (>=FPCVERSION), fp-units-gtk2 (>=FPCVERSION), fp-units-misc (>=FPCVERSION), fp-units-net (>=FPCVERSION), fp-units-rtl (>=FPCVERSION), fp-utils (>=FPCVERSION), libgdk-pixbuf-dev (>=0.17.0), libgtk1.2-dev
|
||||
Architecture: ARCH
|
||||
Depends: libgdk-pixbuf-dev (>=0.17.0), libgtk1.2-dev, 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.
|
||||
|
Loading…
Reference in New Issue
Block a user