changed deb dependencies for new fpc debs

git-svn-id: trunk@9417 -
This commit is contained in:
mattias 2006-06-11 09:19:34 +00:00
parent c83bb3f87b
commit 5312f77440
6 changed files with 12 additions and 178 deletions

View File

@ -13,7 +13,8 @@ rm -rf $TmpDir
mkdir -p $TmpDir
TestPas=$TmpDir/test.pas
echo "program test;" >> $TestPas
echo "{$linklib gpm}" >> $TestPas
echo "{\$linklib gpm}" >> $TestPas
echo "{\$linklib ncurses}" >> $TestPas
echo "begin end." >> $TestPas
fpc $TestPas

View File

@ -1,166 +1,5 @@
#!/bin/bash
set -x
set -e
# ToDo: check libgpm
# ToDo: check if ppcxxx is installed
#------------------------------------------------------------------------------
# parse parameters
#------------------------------------------------------------------------------
Usage="Usage: $0 [nodocs] [notemp] <FPCSrcDir> [release]"
WithDOCS=yes
if [ "x$1" = "xnodocs" ]; then
WithDOCS=no
shift
fi
WithTempDir=yes
if [ "x$1" = "xnotemp" ]; then
WithTempDir=no
shift
fi
FPCSrcDir=$1
if [ "x$FPCSrcDir" = "x" ]; then
echo $Usage
exit -1
fi
FPCSrcDir=$(echo $FPCSrcDir)
shift
FPCRelease=$1
if [ "x$FPCRelease" = "x" ]; then
FPCRelease=$(date +%y%m%d)
else
shift
fi
if [ ! -d $FPCSrcDir/compiler ]; then
echo "The directory $FPCSrcDir does not look like a fpc source directory (fpc/)"
exit -1
fi
#------------------------------------------------------------------------------
# quick tests
./check_fpc_dependencies.sh
CurDir=`pwd`
#------------------------------------------------------------------------------
# patching
#------------------------------------------------------------------------------
# retrieve the version information
echo -n "getting FPC version from local svn ..."
VersionFile="$FPCSrcDir/compiler/version.pas"
CompilerVersion=`cat $VersionFile | grep ' *version_nr *=.*;' | sed -e 's/[^0-9]//g'`
CompilerRelease=`cat $VersionFile | grep ' *release_nr *=.*;' | sed -e 's/[^0-9]//g'`
CompilerPatch=`cat $VersionFile | grep ' *patch_nr *=.*;' | sed -e 's/[^0-9]//g'`
CompilerVersionStr="$CompilerVersion.$CompilerRelease.$CompilerPatch"
FPCVersion="$CompilerVersion.$CompilerRelease"
if [ "$CompilerPatch" != "0" ]; then
FPCVersion="$FPCVersion.$CompilerPatch"
fi
echo " $CompilerVersionStr-$FPCRelease"
SrcTGZ=$(pwd)/fpc-$FPCVersion-$FPCRelease.tar.gz
# download/export fpc svn if needed
if [ ! -f $SrcTGZ ]; then
./create_fpc_export_tgz.sh $FPCSrcDir $SrcTGZ
fi
# create a temporary copy of the fpc sources to patch it
TmpDir=/tmp/fpc_patchdir
if [ "$WithTempDir" = "yes" ]; then
if [ -d $TmpDir ]; then
rm -rf $TmpDir/*
rm -r $TmpDir
fi
mkdir -p $TmpDir
cd $TmpDir
echo "unpacking $SrcTGZ to "$(pwd)" ..."
tar xzf $SrcTGZ
cd -
FPCSrcDir=$TmpDir/fpc
else
TmpDir=$FPCSrcDir
fi
#------------------------------------------------------------------------------
# patch sources
ReplaceScript=replace_in_files.pl
# set version numbers in all Makefiles
echo "set version numbers in all Makefiles ..."
perl replace_in_files.pl -sR -f '=\d.\d.\d' -r =$CompilerVersionStr -m 'Makefile(.fpc)?' $FPCSrcDir/*
#------------------------------------------------------------------------------
#
PackageName=fpc-src
FPCBuildDir=$TmpDir/fpc_build
FPCDeb=$CurDir/$PackageName-$FPCVersion-$FPCRelease.deb
ResourceDir=$CurDir/debian_$PackageName
DebianLibDir=$FPCBuildDir/usr/lib/fpc
DebianRulezDir=$FPCBuildDir/DEBIAN/
DebianDocDir=$FPCBuildDir/usr/share/doc/$PackageName
DebianSourceDir=$FPCBuildDir/usr/share/fpcsrc
Date=`date --rfc-822`
#------------------------------------------------------------------------------
# copy fpc sources
mkdir -p $DebianSourceDir
cp -a $FPCSrcDir/* $DebianSourceDir/
#------------------------------------------------------------------------------
# build fpc
cd $TmpDir
# TODO make all
cd -
#------------------------------------------------------------------------------
# build fpc-src deb
# change debian files
mkdir -p $DebianDocDir
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
# create debian changelog file, needed for version
echo "creating usr/share/doc/fpc/changelog file ..."
File=$DebianDocDir/changelog
echo "fpc ($FPCVersion-$FPCRelease) unstable; urgency=low" > $File
echo ' * Unofficial snapshot build for lazarus' >> $File
echo " -- Mattias Gaertner <mattias@freepascal.org> $Date" >> $File
echo "" >> $File
cat $ResourceDir/changelog >> $File
gzip --best $File
# create changelog.Debian file
echo "creating changelog.Debian file ..."
File=$DebianDocDir/changelog.Debian
cp $ResourceDir/changelog.Debian $File
gzip --best $File
# create debian copyright file
echo "creating copyright file ..."
cp $ResourceDir/copyright $DebianDocDir/
# creating deb
cd $TmpDir
fakeroot dpkg-deb --build $FPCBuildDir
mv $FPCBuildDir.deb $FPCDeb
./create_fpc_deb.sh fpc-src $@
# end.

View File

@ -54,6 +54,8 @@ fi
./check_fpc_dependencies.sh
fakeroot -v
#------------------------------------------------------------------------------
# retrieve the version information
@ -179,6 +181,7 @@ if [ "$PackageName" = "fpc" ]; then
make all
mkdir -p $DebianInstallDir
make install INSTALL_PREFIX=$DebianInstallDir
ln -s $DebianInstallDir/lib/fpc/$FPCVersion/ppc386 $DebianInstallDir/bin/ppc386
cd -
fi

View File

@ -3,12 +3,9 @@
set -x
set -e
# get installed fpc version
#FPCDeb=`dpkg -l | grep fp-compiler`
#if [ "x$FPCDeb" = "x" ]; then
# echo ERROR: fp-compiler deb not installed
# 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`
@ -22,7 +19,7 @@ SrcTGZ=lazarus-$LazVersion-$LazRelease.tar.gz
CurDir=`pwd`
TmpDir=/tmp/lazarus$LazVersion
LazBuildDir=$TmpDir/lazarus_build
LazDeb=$CurDir/lazarus-$LazVersion-$LazRelease.deb
LazDeb=$CurDir/lazarus_${LazVersion}-${LazRelease}_$Arch.deb
DebianSrcDir=$CurDir/debian_lazarus
LazDestDir=$LazBuildDir/usr/share/lazarus
FPCVersion=2.0.2

View File

@ -4,7 +4,7 @@ Section: devel
Priority: optional
Maintainer: Mattias Gaertner <mattias@cvs.freepascal.org>
Architecture: i386
Pre-Depends: debhelper (>= 4.2), libgpmg1-dev
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
Freepascal is a free 32/64bit Pascal Compiler. It comes with a

View File

@ -4,13 +4,7 @@ Section: devel
Priority: optional
Maintainer: Mattias Gaertner <mattias@freepascal.org>
Architecture: i386
Depends: fp-compiler (>=FPCVERSION),
fp-units-base (>=FPCVERSION), fp-units-db (>=FPCVERSION),
fp-units-fcl (>=FPCVERSION), fp-units-gfx (>=FPCVERSION),
fp-units-gtk (>=FPCVERSION), fp-units-misc (>=FPCVERSION),
fp-units-net (>=FPCVERSION), fp-units-rtl (>=FPCVERSION),
fp-utils (>=FPCVERSION), fpcsrc (>=FPCVERSION),
libgdk-pixbuf-devel (>=0.17.0)
Depends: fpc (>=FPCVERSION), fpc-src (>=FPCVERSION), libgdk-pixbuf-devel (>=0.17.0), libgtk1.2-dev
Description: RAD tool for freepascal
Lazarus is a free and opensource RAD tool for FreePascal using the
Lazarus component library LCL. The LCL is included in this package too.