deb: building with a git repo

This commit is contained in:
mattias 2021-10-30 11:21:43 +02:00
parent ed1805b1ac
commit 1e22686cfe
2 changed files with 15 additions and 10 deletions

View File

@ -75,7 +75,7 @@ while [ $# -gt 0 ]; do
*)
echo "invalid parameter $1"
echo "Usage: ./create_lazarus_deb.sh [chmhelp] [gtk1] [qt] [qtlib=<dir>] [release=svn] "
echo "Usage: ./create_lazarus_deb.sh [chmhelp] [gtk1] [qt] [qtlib=<dir>] [release=YourPostfix] "
exit 1
;;
esac
@ -137,7 +137,7 @@ echo "LazVersion=$LazVersion"
echo "FPCVersion=$FPCVersion"
echo "ChangeLogDate=$ChangeLogDate"
# download/export lazarus svn if needed
# download/export lazarus git if needed
if [ ! -f $SrcTGZ ]; then
./create_lazarus_export_tgz.sh $SrcTGZ
fi
@ -204,6 +204,7 @@ strip lazbuild
strip tools/lazres
strip tools/updatepofiles
strip tools/lrstolfm
# Note: svn2revisioninc supports git too
strip tools/svn2revisioninc
if [ -f components/chmhelp/lhelp/lhelp ]; then
strip components/chmhelp/lhelp/lhelp

View File

@ -68,22 +68,26 @@ TmpLazDir=$TmpDir/lazarus
mkdir -p $TmpDir
rm -rf $TmpLazDir
if [ "x$Download" = "xyes" ]; then
echo "downloading lazarus svn ..."
echo "downloading lazarus git ..."
mkdir -p $TmpLazDir
Revision=Exported
cd $TmpDir
svn export http://svn.freepascal.org/svn/lazarus/trunk $TmpLazDir
# git clone --depth=1 https://gitlab.com/freepascal.org/lazarus/lazarus.git $TmpLazDir
# rm -rf $TmpLazDir/.git
# old-svn: svn export http://svn.freepascal.org/svn/lazarus/trunk $TmpLazDir
git clone --depth=1 https://gitlab.com/freepascal.org/lazarus/lazarus.git $TmpLazDir
rm -rf $TmpLazDir/.git
cd -
else
echo "extracting lazarus from local svn ..."
echo "extracting lazarus from local git ..."
LazSrcDir=$(pwd | sed -e 's#/tools/install.*$##')
#Revision=$(svnversion $LazSrcDir) - comment this out as svn no longer works
# old-svn: Revision=$(svnversion $LazSrcDir) - comment this out as svn no longer works
Revision=$(git -C $LazSrcDir describe --always --first-parent)
cd $TmpDir
# cp -a $LazSrcDir $TmpLazDir #can't use svn export anymore
git -C $LazSrcDir --work-tree=$TmpLazDir restore .
# old-svn: cp -a $LazSrcDir $TmpLazDir
mkdir $TmpLazDir
cp -a $LazSrcDir/.git $TmpLazDir/
git -C $TmpLazDir restore .
rm -rf $TmpLazDir/.git
#git -C $LazSrcDir --work-tree=$TmpLazDir restore .
cd -
if [ "$UseCHMHelp" = "1" ]; then
echo