mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
improvements for building debs
git-svn-id: trunk@9395 -
This commit is contained in:
parent
34ec62a9ca
commit
197af73cdf
32
.gitattributes
vendored
32
.gitattributes
vendored
@ -2464,27 +2464,27 @@ tools/find_non_cvs_files.pl -text svneol=native#application/x-perl
|
||||
tools/getallmofiles.sh -text svneol=native#application/x-sh
|
||||
tools/getallpofiles.sh -text svneol=native#application/x-sh
|
||||
tools/install/build_fpc-src_rpm.sh svneol=native#text/plain
|
||||
tools/install/build_fpc_rpm.sh -text svneol=native#application/x-sh
|
||||
tools/install/build_fpc_rpm.sh svneol=native#text/plain
|
||||
tools/install/build_fpc_snaphot_rpm.sh svneol=native#text/plain
|
||||
tools/install/create_clean_fpcsrc_directory.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_clean_lazarus_directory.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_fpc_deb.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_fpc_export_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_lazarus_deb.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_lazarus_export_tgz.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_lazarus_rpm.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_clean_fpcsrc_directory.sh svneol=native#text/plain
|
||||
tools/install/create_clean_lazarus_directory.sh svneol=native#text/plain
|
||||
tools/install/create_fpc_deb.sh svneol=native#text/plain
|
||||
tools/install/create_fpc_export_tgz.sh svneol=native#text/plain
|
||||
tools/install/create_fpc_tgz_from_local_dir.sh svneol=native#text/plain
|
||||
tools/install/create_lazarus_deb.sh svneol=native#text/plain
|
||||
tools/install/create_lazarus_export_tgz.sh svneol=native#text/plain
|
||||
tools/install/create_lazarus_rpm.sh svneol=native#text/plain
|
||||
tools/install/create_lazarus_snapshot_rpm.sh svneol=native#text/plain
|
||||
tools/install/create_lazarus_tgz_from_local_dir.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_lazarus_tgz_from_local_dir.sh svneol=native#text/plain
|
||||
tools/install/cross_unix/HowToCreate_fpc_crosswin32_rpm.txt svneol=native#text/plain
|
||||
tools/install/cross_unix/build_linux_cross_win32_rpm.sh svneol=native#text/plain
|
||||
tools/install/cross_unix/update_cross_fpc.sh svneol=native#text/plain
|
||||
tools/install/cvsexportlocal.pas svneol=native#text/pascal
|
||||
tools/install/do_nothing.sh -text svneol=native#application/x-sh
|
||||
tools/install/download_and_build_fpc_rpm.sh -text svneol=native#application/x-sh
|
||||
tools/install/file_filter.sh -text svneol=native#application/x-sh
|
||||
tools/install/do_nothing.sh svneol=native#text/plain
|
||||
tools/install/download_and_build_fpc_rpm.sh svneol=native#text/plain
|
||||
tools/install/file_filter.sh svneol=native#text/plain
|
||||
tools/install/fpc-src.spec svneol=native#text/plain
|
||||
tools/install/get_lazarus_version.sh -text svneol=native#application/x-sh
|
||||
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
|
||||
tools/install/macosx/fpc_installer_info.zip -text svneol=unset#application/zip
|
||||
@ -2500,8 +2500,8 @@ tools/install/rpm/fpc.spec.template svneol=native#text/plain
|
||||
tools/install/rpm/fpc_crosswin32.spec.template svneol=native#text/plain
|
||||
tools/install/rpm/get_rpm_source_dir.sh svneol=native#text/plain
|
||||
tools/install/rpm/lazarus.spec.template svneol=native#text/plain
|
||||
tools/install/setup.sh -text svneol=native#application/x-sh
|
||||
tools/install/smart_strip.sh -text svneol=native#application/x-sh
|
||||
tools/install/setup.sh svneol=native#text/plain
|
||||
tools/install/smart_strip.sh svneol=native#text/plain
|
||||
tools/install/win32/build-fpc.bat svneol=native#text/x-msdos-program
|
||||
tools/install/win32/build-lazarus.bat svneol=native#text/x-msdos-program
|
||||
tools/install/win32/create_installer.bat svneol=native#text/x-msdos-program
|
||||
|
@ -34,9 +34,9 @@ fi
|
||||
FPCSrcDir=$(echo $FPCSrcDir)
|
||||
shift
|
||||
|
||||
LazRelease=$1
|
||||
if [ "x$LazRelease" = "x" ]; then
|
||||
LazRelease=$(date +%y%m%d)
|
||||
FPCRelease=$1
|
||||
if [ "x$FPCRelease" = "x" ]; then
|
||||
FPCRelease=$(date +%y%m%d)
|
||||
else
|
||||
shift
|
||||
fi
|
||||
@ -75,11 +75,11 @@ CompilerVersion=`cat $VersionFile | grep ' *version_nr *=.*;' | sed -e 's/[^0-9]
|
||||
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"
|
||||
LazVersion="$CompilerVersion.$CompilerRelease"
|
||||
FPCVersion="$CompilerVersion.$CompilerRelease"
|
||||
if [ "$CompilerPatch" != "0" ]; then
|
||||
LazVersion="$LazVersion.$CompilerPatch"
|
||||
FPCVersion="$FPCVersion.$CompilerPatch"
|
||||
fi
|
||||
echo " $CompilerVersionStr-$LazRelease"
|
||||
echo " $CompilerVersionStr-$FPCRelease"
|
||||
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ if [ "$PkgType" = "deb" ]; then
|
||||
File=changelog
|
||||
OldFile=changelog.old.fpc
|
||||
cp $File $OldFile
|
||||
echo "fpc ($LazVersion-$LazRelease) unstable; urgency=low" > $File
|
||||
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
|
||||
@ -135,7 +135,7 @@ if [ "$PkgType" = "deb" ]; then
|
||||
cd $TmpDir/fpc
|
||||
make debcopy
|
||||
cd -
|
||||
cd /usr/src/fpc-$LazVersion
|
||||
cd /usr/src/fpc-$FPCVersion
|
||||
./debian/rules binary-arch
|
||||
cd -
|
||||
|
||||
@ -148,13 +148,13 @@ else
|
||||
|
||||
# change spec file
|
||||
cat $SpecFileTemplate | \
|
||||
sed -e 's/^Version: .*/Version: '"$LazVersion/" \
|
||||
-e 's/^Release: .*/Release: '"$LazRelease/" \
|
||||
sed -e 's/^Version: .*/Version: '"$FPCVersion/" \
|
||||
-e 's/^Release: .*/Release: '"$FPCRelease/" \
|
||||
> $SpecFile
|
||||
# -e 's/\(%define builddocdir.*\)/%define __strip smart_strip.sh\n\n\1/' \
|
||||
# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \
|
||||
|
||||
SrcTGZ=$(rpm/get_rpm_source_dir.sh)/SOURCES/fpc-$CompilerVersionStr-$LazRelease.source.tar.gz
|
||||
SrcTGZ=$(rpm/get_rpm_source_dir.sh)/SOURCES/fpc-$CompilerVersionStr-$FPCRelease.source.tar.gz
|
||||
echo "creating $SrcTGZ ..."
|
||||
tar czf $SrcTGZ -C $TmpDir fpc
|
||||
|
||||
@ -166,7 +166,7 @@ else
|
||||
fi
|
||||
rpmbuild --nodeps -ba $SpecFile
|
||||
|
||||
echo "The new rpm can be found in $(./rpm/get_rpm_source_dir.sh)/RPMS/i386/fpc-$LazVersion-$LazRelease.i386.rpm"
|
||||
echo "The new rpm can be found in $(./rpm/get_rpm_source_dir.sh)/RPMS/i386/fpc-$FPCVersion-$FPCRelease.i386.rpm"
|
||||
fi
|
||||
|
||||
# end.
|
||||
|
@ -3,41 +3,183 @@
|
||||
set -x
|
||||
set -e
|
||||
|
||||
Usage="Usage: $0 devel or stable"
|
||||
# ToDo: check libgpm
|
||||
# ToDo: check if ppcxxx is installed
|
||||
|
||||
FPCVersion=$1
|
||||
#------------------------------------------------------------------------------
|
||||
# parse parameters
|
||||
#------------------------------------------------------------------------------
|
||||
Usage="Usage: $0 [nodocs] [notemp] <FPCSrcDir> [release]"
|
||||
|
||||
FPCVersionOk=no
|
||||
for ver in devel stable; do
|
||||
if [ "x$FPCVersion" = "x$ver" ]; then
|
||||
FPCVersionOk=yes
|
||||
fi
|
||||
done
|
||||
if [ "x$FPCVersionOk" = "xno" ]; then
|
||||
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
|
||||
|
||||
|
||||
# set here the fpc cvs dates for the various versions
|
||||
if [ "x$FPCVersion" = "xdevel" ]; then
|
||||
Year=02
|
||||
Month=12
|
||||
Day=25
|
||||
LazVersion=1.1
|
||||
fi
|
||||
if [ "x$FPCVersion" = "xstable" ]; then
|
||||
Year=03
|
||||
Month=03
|
||||
Day=01
|
||||
LazVersion=1.0.7
|
||||
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 -
|
||||
TmpDir=$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)?' $TmpDir/fpc/*
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
|
||||
FPCBuildDir=$TmpDir/fpc_build
|
||||
FPCDeb=$CurDir/fpc-$FPCVersion-$FPCRelease.deb
|
||||
DebianSrcDir=$CurDir/debian_fpc
|
||||
FPCDestDir=$FPCBuildDir/usr/lib/fpc
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build fpc
|
||||
cd $TmpDir
|
||||
# TODO make all
|
||||
cd -
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# build fpc debs
|
||||
|
||||
# change debian files
|
||||
DebianRulezDir=$FPCBuildDir/DEBIAN/
|
||||
$DebianDocDir=$FPCBuildDir/usr/share/doc/fpc
|
||||
mkdir -p $DebianRulezDir
|
||||
Date=`date --rfc-822`
|
||||
|
||||
# create debian control file, which contains the package description
|
||||
echo "creating DEBIAN/control file"
|
||||
cat $DebianSrcDir/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 $DebianSrcDir/changelog >> $File
|
||||
gzip --best $File
|
||||
|
||||
# create debian copyright file
|
||||
echo "creating copyright file ..."
|
||||
cp $DebianSrcDir/copyright $DebianDocDir/
|
||||
|
||||
# create debian/rules file
|
||||
# - copy the complete examples directory
|
||||
# - do not install non existing files Changes.fcl Changes.utils
|
||||
cat $DebianSrcDir/rules | \
|
||||
sed -e 's/^\(.*mv .*\)uncgi\( .*examples.*\)$/\1???*\2/' \
|
||||
-e 's/^.*logs\/Changes\.fcl.*$//' \
|
||||
-e 's/^.*logs\/Changes\.utils.*$//' \
|
||||
> rules.laz
|
||||
cp rules.laz rules # use cp to preserve file attribs
|
||||
rm rules.laz
|
||||
cd -
|
||||
|
||||
|
||||
# compile
|
||||
cd $TmpDir/fpc
|
||||
make debcopy
|
||||
cd -
|
||||
cd /usr/src/fpc-$FPCVersion
|
||||
./debian/rules binary-arch
|
||||
cd -
|
||||
|
||||
|
||||
exit
|
||||
|
||||
OLD STUFF
|
||||
|
||||
|
||||
# get date of day
|
||||
Year=`date +%y`
|
||||
Month=`date +%m`
|
||||
Day=`date +%d`
|
||||
|
||||
Date=20$Year$Month$Day
|
||||
LazRelease=laz.$Date
|
||||
SrcTGZ=fpc-src-$LazVersion-$LazRelease.tgz
|
||||
TmpDir=/tmp/fpc$LazVersion
|
||||
CurDir=`pwd`
|
||||
FPCRelease=laz.$Date
|
||||
SrcTGZ=fpc-src-$FPCVersion-$FPCRelease.tgz
|
||||
TmpDir=/tmp/fpc$FPCVersion
|
||||
DebianRulezDir=$TmpDir/fpc/install/debian/
|
||||
|
||||
# download fpc cvs if necessary
|
||||
@ -60,7 +202,7 @@ cd $DebianRulezDir
|
||||
File=changelog
|
||||
OldFile=changelog.old.fpc
|
||||
cp $File $OldFile
|
||||
echo "fpc ($LazVersion-$LazRelease) unstable; urgency=low" > $File
|
||||
echo "fpc ($FPCVersion-$FPCRelease) unstable; urgency=low" > $File
|
||||
echo ' * Unofficial snapshot build for lazarus' >> $File
|
||||
echo ' -- Mattias Gaertner <mattias@freepascal.org> Mon, 31 Mar 2003 11:01:50 +0100' >> $File
|
||||
echo "" >> $File
|
||||
@ -76,9 +218,9 @@ cat rules | \
|
||||
sed -e's/^\(.*mv .*\)uncgi\( .*examples.*\)$/\1???*\2/' \
|
||||
-e 's/^.*logs\/Changes\.fcl.*$//' \
|
||||
-e 's/^.*logs\/Changes\.utils.*$//' \
|
||||
> rules.laz
|
||||
cp rules.laz rules
|
||||
rm rules.laz
|
||||
> rules.tmp
|
||||
cp rules.tmp rules
|
||||
rm rules.tmp
|
||||
cd -
|
||||
|
||||
|
||||
@ -86,7 +228,7 @@ cd -
|
||||
cd $TmpDir/fpc
|
||||
make debcopy
|
||||
cd -
|
||||
cd /usr/src/fpc-$LazVersion
|
||||
cd /usr/src/fpc-$FPCVersion
|
||||
./debian/rules binary-arch
|
||||
cd -
|
||||
|
||||
@ -94,9 +236,9 @@ echo ===================================================
|
||||
echo
|
||||
echo building fpc-src deb ...
|
||||
|
||||
FPCSrcTmpDir=/tmp/fpc-src$LazVersion
|
||||
FPCSrcTmpDir=/tmp/fpc-src$FPCVersion
|
||||
FPCSrcBuildDir=$FPCSrcTmpDir/fpc-src_build
|
||||
FPCSrcDeb=fpc-src-$LazVersion-$LazRelease.deb
|
||||
FPCSrcDeb=fpc-src-$FPCVersion-$FPCRelease.deb
|
||||
DebianSrcDir=$CurDir/debian_fpc-src
|
||||
|
||||
echo "Build directory is $FPCSrcBuildDir"
|
||||
@ -119,14 +261,14 @@ cd -
|
||||
echo "copying control file"
|
||||
mkdir -p $FPCSrcBuildDir/DEBIAN
|
||||
cat $DebianSrcDir/control | \
|
||||
sed -e "s/FPCVERSION/$LazVersion-$LazRelease/g" \
|
||||
sed -e "s/FPCVERSION/$FPCVersion-$FPCRelease/g" \
|
||||
> $FPCSrcBuildDir/DEBIAN/control
|
||||
|
||||
# copyright and changelog files
|
||||
echo "copying copyright and changelog files"
|
||||
mkdir -p $FPCSrcBuildDir/usr/share/doc/fpc-src
|
||||
cat $DebianSrcDir/changelog | \
|
||||
sed -e "s/FPCVERSION/$LazVersion-$LazRelease/g" \
|
||||
sed -e "s/FPCVERSION/$FPCVersion-$FPCRelease/g" \
|
||||
-e "s/FPCDATE/$Year-$Month-$Day/g" \
|
||||
> $FPCSrcBuildDir/usr/share/doc/fpc-src/changelog
|
||||
cp $DebianSrcDir/{copyright,changelog.Debian} $FPCSrcBuildDir/usr/share/doc/fpc-src/
|
||||
|
@ -1,61 +1,43 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#
|
||||
|
||||
#set -x
|
||||
set -e
|
||||
|
||||
Usage="$0 "'outputfilename devel or stable [cvs date mm/dd/yy]'
|
||||
Usage="$0 download|<fpc-source-directory> <outputfilename>"
|
||||
|
||||
SourceDir=$1;
|
||||
Download=no
|
||||
if [ "x$SourceDir" = "xdownload" ]; then
|
||||
Download=yes
|
||||
fi
|
||||
shift
|
||||
|
||||
OutputFile=$1
|
||||
FPCVersion=$2
|
||||
FPCDate=$3
|
||||
TempDir=/tmp/fpc_cvs_export/
|
||||
|
||||
FPCVersionOk=no
|
||||
for ver in devel stable; do
|
||||
if [ "x$FPCVersion" = "x$ver" ]; then
|
||||
FPCVersionOk=yes
|
||||
fi
|
||||
done
|
||||
if [ "x$FPCVersionOk" = "xno" ]; then
|
||||
echo $Usage
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ "x$OutputFile" = "x" ]; then
|
||||
echo $Usage
|
||||
exit -1
|
||||
fi
|
||||
if [ "x$FPCDate" = "x" ]; then
|
||||
FPCDate='NOW'
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
echo downloading cvs $CVSParams ...
|
||||
mkdir -p $TempDir
|
||||
cd $TempDir
|
||||
rm -rf fpc
|
||||
export CVS_RSH=
|
||||
export CVSROOT=:pserver:cvs@cvs.freepascal.org:/FPC/CVS
|
||||
echo 'The password is: cvs'
|
||||
cvs login
|
||||
cvs -z3 export -D $FPCDate fpc
|
||||
if [ "x$FPCVersion" = "xstable" ]; then
|
||||
Dirs='compiler rtl logs install'
|
||||
for dir in $Dirs; do
|
||||
rm -rf fpc/$dir
|
||||
cvs -z3 export -r FIXES_1_0_0 -D $FPCDate fpc/$dir
|
||||
echo
|
||||
done
|
||||
if [ "x$Download" = "xyes" ]; then
|
||||
echo "downloading fpc svn ..."
|
||||
cd /tmp
|
||||
rm -rf /tmp/fpc
|
||||
svn export http://svn.freepascal.org/svn/fpc/trunk fpc
|
||||
cd -
|
||||
else
|
||||
echo "extracting fpc from local svn ..."
|
||||
rm -rf /tmp/fpc
|
||||
svn export $SourceDir /tmp/fpc
|
||||
fi
|
||||
|
||||
cd /tmp
|
||||
echo "packing ..."
|
||||
tar cvzf /tmp/fpc.tgz fpc
|
||||
cd -
|
||||
|
||||
# pack
|
||||
cd $TempDir
|
||||
echo 'creating tgz ...'
|
||||
tar czf fpc_src.tgz fpc
|
||||
cd -
|
||||
mv $TempDir/fpc_src.tgz $OutputFile
|
||||
rm -rf $TempDir
|
||||
mv /tmp/fpc.tgz $OutputFile
|
||||
rm -rf /tmp/fpc
|
||||
|
||||
# end.
|
||||
|
||||
|
@ -4,11 +4,11 @@ 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
|
||||
#FPCDeb=`dpkg -l | grep fp-compiler`
|
||||
#if [ "x$FPCDeb" = "x" ]; then
|
||||
# echo ERROR: fp-compiler deb not installed
|
||||
# exit
|
||||
#fi
|
||||
|
||||
# get date of day
|
||||
Year=`date +%y`
|
||||
@ -16,20 +16,19 @@ Month=`date +%m`
|
||||
Day=`date +%d`
|
||||
|
||||
Date=20$Year$Month$Day
|
||||
LazVersion=0.9.16
|
||||
LazRelease=`dpkg -s fp-compiler | grep '^Version' | sed -e 's/Version: //'`
|
||||
LazRelease=`echo $LazRelease | sed -e 's/-/_/g'`
|
||||
SrcTGZ=lazarus-$Date.tgz
|
||||
LazVersion=$(./get_lazarus_version.sh)
|
||||
LazRelease='0'
|
||||
SrcTGZ=lazarus-$LazVersion-$LazRelease.tar.gz
|
||||
CurDir=`pwd`
|
||||
TmpDir=/tmp/lazarus$LazVersion
|
||||
LazBuildDir=$TmpDir/lazarus_build
|
||||
LazDeb=$CurDir/lazarus-$LazVersion-fpc_$LazRelease.deb
|
||||
LazDeb=$CurDir/lazarus-$LazVersion-$LazRelease.deb
|
||||
DebianSrcDir=$CurDir/debian_lazarus
|
||||
LazDestDir=$LazBuildDir/usr/share/lazarus
|
||||
FPCVersion=`echo $LazRelease | sed -e 's/_.*//'`
|
||||
FPCVersion=2.0.2
|
||||
ChangeLogDate=`date --rfc-822`
|
||||
|
||||
# download lazarus cvs if necessary
|
||||
# download/export lazarus svn if needed
|
||||
if [ ! -f $SrcTGZ ]; then
|
||||
./create_lazarus_export_tgz.sh $SrcTGZ
|
||||
fi
|
||||
@ -46,16 +45,27 @@ echo "unpacking $SrcTGZ ..."
|
||||
mkdir -p $LazBuildDir/usr/share/
|
||||
cd $LazBuildDir/usr/share/
|
||||
tar xzf $CurDir/$SrcTGZ
|
||||
find . -name '.cvsignore' -exec rm {} \;
|
||||
cd -
|
||||
|
||||
# compile
|
||||
echo "Compiling may take a while ... =========================================="
|
||||
cd $LazDestDir
|
||||
make
|
||||
MAKEOPTS="-Fl/opt/gnome/lib"
|
||||
if [ -n "$FPCCfg" ]; then
|
||||
MAKEOPTS="$MAKEOPTS -n @$FPCCfg"
|
||||
fi
|
||||
make bigide OPT="$MAKEOPTS" USESVN2REVISIONINC=0
|
||||
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
|
||||
cd -
|
||||
|
||||
# create control file
|
||||
echo "========================================================================="
|
||||
echo "copying control file"
|
||||
mkdir -p $LazBuildDir/DEBIAN
|
||||
cat $DebianSrcDir/control | \
|
||||
@ -72,23 +82,23 @@ gzip --best $LazBuildDir/usr/share/doc/lazarus/changelog.Debian
|
||||
|
||||
# icons, links
|
||||
mkdir -p $LazBuildDir/usr/share/pixmaps/
|
||||
mkdir -p $LazBuildDir/usr/share/gnome/apps/Development/
|
||||
mkdir -p $LazBuildDir/usr/share/applications
|
||||
mkdir -p $LazBuildDir/usr/bin/
|
||||
install -m 644 $LazDestDir/images/ide_icon48x48.png $LazBuildDir/usr/share/pixmaps/lazarus.png
|
||||
install -m 644 $LazDestDir/gnome.ide.desktop $LazBuildDir/usr/share/gnome/apps/Development/lazarus.desktop
|
||||
install -m 644 $LazDestDir/install/lazarus.desktop $LazBuildDir/usr/share/applications/lazarus.desktop
|
||||
ln -s $LazDestDir/lazarus $LazBuildDir/usr/bin/lazarus
|
||||
ln -s $LazDestDir/startlazarus $LazBuildDir/usr/bin/startlazarus
|
||||
|
||||
# fixing permissions
|
||||
echo "fixing permissions ..."
|
||||
find $LazBuildDir -type d | xargs chmod 755 # this is necessary on Debian Woody, don't ask me why
|
||||
find $LazBuildDir -name '*.sh' -exec chmod a+x {} \;
|
||||
find $LazBuildDir -type d | xargs chmod 755 # this is needed on Debian Woody, don't ask me why
|
||||
|
||||
# creating deb
|
||||
echo "creating deb ..."
|
||||
cd $TmpDir
|
||||
fakeroot dpkg-deb --build $LazBuildDir
|
||||
mv $LazBuildDir.deb $LazDeb
|
||||
echo "$LazDeb created."
|
||||
echo "the new deb can be fonud at $LazDeb."
|
||||
cd -
|
||||
|
||||
# end.
|
||||
|
@ -18,7 +18,7 @@ if [ "x$OutputFile" = "x" ]; then
|
||||
fi
|
||||
|
||||
if [ "x$Download" = "xyes" ]; then
|
||||
echo "downloading lazarus cvs ..."
|
||||
echo "downloading lazarus svn ..."
|
||||
cd /tmp
|
||||
rm -rf /tmp/lazarus
|
||||
svn export http://svn.freepascal.org/svn/lazarus/trunk lazarus
|
||||
|
@ -26,7 +26,7 @@ SrcTGZ=$(./rpm/get_rpm_source_dir.sh)/SOURCES/$Src
|
||||
TmpDir=/tmp/lazarus$LazVersion
|
||||
SpecFile=rpm/lazarus-$LazVersion-$LazRelease.spec
|
||||
|
||||
# download lazarus svn if necessary
|
||||
# download lazarus svn if needed
|
||||
echo "creating lazarus tgz ..."
|
||||
#if [ ! -f $SrcTGZ ]; then
|
||||
sh create_lazarus_export_tgz.sh $SrcTGZ
|
||||
|
@ -12,6 +12,7 @@ Depends: fp-compiler (>=FPCVERSION),
|
||||
fp-utils (>=FPCVERSION), fpcsrc (>=FPCVERSION),
|
||||
libgdk-pixbuf-devel (>=0.17.0)
|
||||
Description: RAD tool for freepascal
|
||||
Lazarus is a free RAD tool for FreePascal using the lazarus component
|
||||
library LCL.
|
||||
Lazarus is a free and opensource RAD tool for FreePascal using the
|
||||
Lazarus component library LCL. The LCL is included in this package too.
|
||||
See http://www.lazarus.freepascal.org
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user