deb: added option pas2jszip

git-svn-id: trunk@61663 -
This commit is contained in:
mattias 2019-08-03 16:47:34 +00:00
parent da4a458242
commit 343fabb424
3 changed files with 44 additions and 0 deletions

1
.gitattributes vendored
View File

@ -12265,6 +12265,7 @@ tools/install/get_lazarus_version.bat svneol=native#text/x-msdos-program
tools/install/get_lazarus_version.sh svneol=native#text/plain
tools/install/get_svn_revision_number.sh svneol=native#text/plain
tools/install/linux/environmentoptions.xml svneol=native#text/plain
tools/install/linux/pas2jsdsgnoptions.xml svneol=native#text/plain
tools/install/macosx/License.html svneol=native#text/plain
tools/install/macosx/README.txt svneol=native#text/plain
tools/install/macosx/ReadMe.html svneol=native#text/plain

View File

@ -9,12 +9,15 @@
# qt compile IDE and programs for qt.
# append-revision append the svn revision to the .deb version
# chmhelp add package chmhelp and add chm,kwd files in docs/chm
# pas2jszip <pas2js-linux-version.zip>
# unzip pas2js release zip to "pas2js/version"
set -e
LCLWidgetset=
LazVersionPostfix=
UseCHMHelp=
Pas2jsZip=
LazRelease='0'
while [ $# -gt 0 ]; do
@ -53,6 +56,23 @@ while [ $# -gt 0 ]; do
UseCHMHelp=1
;;
pas2jszip)
shift
echo "param=$1"
Pas2jsZip=$1
Pattern="*pas2js*.zip"
if [[ $Pas2jsZip == $Pattern ]]; then
echo "using pas2js zip file $Pas2jsZip"
else
echo "invalid pas2js zip file $Pas2jsZip"
exit -1
fi
if [ ! -f $Pas2jsZip ]; then
echo "missing pas2js zip file $Pas2jsZip"
exit -1
fi
;;
*)
echo "invalid parameter $1"
echo "Usage: ./create_lazarus_deb.sh [chmhelp] [gtk1] [qt] [qtlib=<dir>] [release=svn] "
@ -110,6 +130,7 @@ EtcSrcDir=$CurDir/linux
LazSrcDir=../..
LazDestDir=$LazBuildDir/usr/share/lazarus/${LazVersion}
LazDestDirInstalled=/usr/share/lazarus/${LazVersion}
Pas2jsVer=
echo "ppcbin=$ppcbin"
echo "LazVersion=$LazVersion"
@ -142,6 +163,18 @@ if [ "$UseCHMHelp" = "1" ]; then
cp -v *.kwd *.chm $LazDestDir/docs/chm/
cd -
fi
if [ -n $Pas2jsZip ]; then
# unzip pas2jszip to pas2js/version
mkdir $LazDestDir/pas2js # fails if already there -> good
unzip $Pas2jsZip -d $LazDestDir/pas2js
Pas2jsBin="$LazDestDir/pas2js/*pas2js*/bin/pas2js"
if [ ! -f $Pas2jsBin ]; then
echo "missing $Pas2jsZip/*pas2js*/bin/pas2js"
exit 1
fi
Pas2jsVer=$($Pas2jsBin -iV | tr -d '\n')
mv $LazDestDir/pas2js/*pas2js* $LazDestDir/pas2js/$Pas2jsVer
fi
chmod a-x $LazDestDir/debian/rules
# compile
@ -226,6 +259,12 @@ cat $EtcSrcDir/environmentoptions.xml | \
sed -e "s#__LAZARUSDIR__#$LazDestDirInstalled/#" \
-e "s#__FPCSRCDIR__#/usr/share/fpcsrc/\$(FPCVER)/#" \
> $LazBuildDir/etc/lazarus/environmentoptions.xml
if [ -n $Pas2jsZip ]; then
cat $EtcSrcDir/pas2jsdsgnoptions.xml | \
sed -e "s#__PAS2JSVERSION__#$Pas2jsVer#" \
> $LazBuildDir/etc/lazarus/pas2jsdsgnoptions.xml
cat $LazBuildDir/etc/lazarus/pas2jsdsgnoptions.xml
fi
chmod 644 $LazBuildDir/etc/lazarus/*.xml
# fixing permissions

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<compiler value="$(LazarusDir)/pas2js/__PAS2JSVERSION__/bin/pas2js"/>
</CONFIG>