mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 09:39:07 +02:00
fpc deb: add installed-size
git-svn-id: trunk@38354 -
This commit is contained in:
parent
e57cf9363b
commit
16ec1d1b95
@ -200,13 +200,46 @@ perl replace_in_files.pl -sR -f '=\d.\d.\d' -r =$CompilerVersionStr -m 'Makefile
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# create rulez and files
|
||||
|
||||
# change debian files
|
||||
mkdir -p $DebianDocDir
|
||||
chmod 755 $DebianDocDir
|
||||
mkdir -p $DebianRulezDir
|
||||
chmod 755 $DebianRulezDir
|
||||
|
||||
if [ "$PackageName" = "fpc-src" ]; then
|
||||
# copy fpc sources
|
||||
mkdir -p $DebianSourceDir
|
||||
cp -a $FPCSrcDir/* $DebianSourceDir/
|
||||
fi
|
||||
|
||||
if [ "$PackageName" = "fpc" ]; then
|
||||
# build fpc
|
||||
mkdir -p $FPCBuildDir/etc
|
||||
cd $FPCSrcDir
|
||||
make clean all ${FPCArch:+FPCArch=$FPCArch} ${OS_TARGET:+OS_TARGET=$OS_TARGET} ${FPC:+FPC=$FPC} ${BINUTILSPREFIX:+BINUTILSPREFIX=$BINUTILSPREFIX} ${CROSSINSTALL:+CROSSINSTALL=$CROSSINSTALL}
|
||||
mkdir -p $DebianInstallDir
|
||||
make install INSTALL_PREFIX=$DebianInstallDir ${FPCArch:+FPCArch=$FPCArch} ${OS_TARGET:+OS_TARGET=$OS_TARGET} ${FPC:+FPC=$FPC} ${BINUTILSPREFIX:+BINUTILSPREFIX=$BINUTILSPREFIX} ${CROSSINSTALL:+CROSSINSTALL=$CROSSINSTALL}
|
||||
if test -z "$BINUTILSPREFIX"
|
||||
then
|
||||
# need up to date samplecfg that chains cross compiler additions
|
||||
grep 'fpc-cross.cfg' $DebianInstallDir/lib/fpc/$FPCVersion/samplecfg &>/dev/null || \
|
||||
sed -i -e "/^FPCPATH=/aFPCPARENT=\"\`dirname \"\$1\"\`\"
|
||||
;/^#ENDIF NEEDCROSSBINUTILS/i#include \$FPCPARENT/fpc-cross.cfg" $DebianInstallDir/lib/fpc/$FPCVersion/samplecfg
|
||||
else cat > $DebianInstallDir/lib/fpc/$FPCVersion/fpc${TARGET_SUFFIX}.cfg <<CROSS
|
||||
# Detect $TARGET compiles
|
||||
#IF \$fpc-target = $TARGET
|
||||
-XP$BINUTILSPREFIX
|
||||
#WRITE Target $TARGET with binutils prefix $BINUTILSPREFIX
|
||||
#END
|
||||
CROSS
|
||||
fi
|
||||
cd -
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# create rulez and files
|
||||
|
||||
# change debian files
|
||||
DEPENDS="$BINUTILS"
|
||||
|
||||
if test -n "$CROSSINSTALL"
|
||||
@ -214,6 +247,8 @@ then
|
||||
DEPENDS="$DEPENDS, fpc (= $FPCVersion)"
|
||||
fi
|
||||
|
||||
# get installed size in kb
|
||||
DebSize=$(du -s $FPCBuildDir | cut -f1)
|
||||
|
||||
# create debian control file, which contains the package description
|
||||
echo "creating DEBIAN/control file"
|
||||
@ -221,6 +256,7 @@ cat $ResourceDir/control \
|
||||
| sed -e "s/FPCVERSION/$FPCVersion/g" -e "s/ARCH/$Arch/g" \
|
||||
-e "s/^Package: .*/Package: $PackageName$TARGET_SUFFIX/" \
|
||||
-e "s/Depends: binutils/Depends: $DEPENDS/" \
|
||||
-e "s/DEBSIZE/$DebSize/" \
|
||||
> $DebianRulezDir/control
|
||||
|
||||
|
||||
@ -297,38 +333,8 @@ gzip --best $File
|
||||
echo "creating copyright file ..."
|
||||
cp $ResourceDir/copyright $DebianDocDir/
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
if [ "$PackageName" = "fpc-src" ]; then
|
||||
# copy fpc sources
|
||||
mkdir -p $DebianSourceDir
|
||||
cp -a $FPCSrcDir/* $DebianSourceDir/
|
||||
fi
|
||||
|
||||
if [ "$PackageName" = "fpc" ]; then
|
||||
# build fpc
|
||||
mkdir -p $FPCBuildDir/etc
|
||||
cd $FPCSrcDir
|
||||
make clean all ${FPCArch:+FPCArch=$FPCArch} ${OS_TARGET:+OS_TARGET=$OS_TARGET} ${FPC:+FPC=$FPC} ${BINUTILSPREFIX:+BINUTILSPREFIX=$BINUTILSPREFIX} ${CROSSINSTALL:+CROSSINSTALL=$CROSSINSTALL}
|
||||
mkdir -p $DebianInstallDir
|
||||
make install INSTALL_PREFIX=$DebianInstallDir ${FPCArch:+FPCArch=$FPCArch} ${OS_TARGET:+OS_TARGET=$OS_TARGET} ${FPC:+FPC=$FPC} ${BINUTILSPREFIX:+BINUTILSPREFIX=$BINUTILSPREFIX} ${CROSSINSTALL:+CROSSINSTALL=$CROSSINSTALL}
|
||||
if test -z "$BINUTILSPREFIX"
|
||||
then
|
||||
# need up to date samplecfg that chains cross compiler additions
|
||||
grep 'fpc-cross.cfg' $DebianInstallDir/lib/fpc/$FPCVersion/samplecfg &>/dev/null || \
|
||||
sed -i -e "/^FPCPATH=/aFPCPARENT=\"\`dirname \"\$1\"\`\"
|
||||
;/^#ENDIF NEEDCROSSBINUTILS/i#include \$FPCPARENT/fpc-cross.cfg" $DebianInstallDir/lib/fpc/$FPCVersion/samplecfg
|
||||
else cat > $DebianInstallDir/lib/fpc/$FPCVersion/fpc${TARGET_SUFFIX}.cfg <<CROSS
|
||||
# Detect $TARGET compiles
|
||||
#IF \$fpc-target = $TARGET
|
||||
-XP$BINUTILSPREFIX
|
||||
#WRITE Target $TARGET with binutils prefix $BINUTILSPREFIX
|
||||
#END
|
||||
CROSS
|
||||
fi
|
||||
cd -
|
||||
fi
|
||||
|
||||
# fixing permissions
|
||||
echo "fixing permissions ..."
|
||||
find $FPCBuildDir -type d -print0 | xargs -0 chmod 755 # this is needed, don't ask me why
|
||||
|
@ -4,6 +4,7 @@ Section: devel
|
||||
Priority: optional
|
||||
Maintainer: Mattias Gaertner <mattias@cvs.freepascal.org>
|
||||
Architecture: ARCH
|
||||
Installed-Size: DEBSIZE
|
||||
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
|
||||
|
@ -6,6 +6,7 @@ Maintainer: Mattias Gaertner <mattias@cvs.freepascal.org>
|
||||
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
|
||||
Installed-Size: DEBSIZE
|
||||
Description: Free Pascal Compiler
|
||||
Freepascal is a free 32/64bit Pascal Compiler. It comes with a
|
||||
run-time library fully compatible with Turbo Pascal 7.0 and nearly
|
||||
|
Loading…
Reference in New Issue
Block a user