mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-23 20:00:03 +01:00
snapshot rpm build script: added support for using full fpc version number in file name (2.2.2rc1)
git-svn-id: trunk@15371 -
This commit is contained in:
parent
9da100f931
commit
c80ec36fb2
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -3708,6 +3708,7 @@ tools/install/freebsd_ports/distinfo svneol=native#text/plain
|
|||||||
tools/install/freebsd_ports/files/patch-Makefile svneol=native#text/plain
|
tools/install/freebsd_ports/files/patch-Makefile svneol=native#text/plain
|
||||||
tools/install/freebsd_ports/files/patch-components-printers-unix_udlgselectprinter.pp svneol=native#text/plain
|
tools/install/freebsd_ports/files/patch-components-printers-unix_udlgselectprinter.pp svneol=native#text/plain
|
||||||
tools/install/freebsd_ports/pkg-descr svneol=native#text/plain
|
tools/install/freebsd_ports/pkg-descr svneol=native#text/plain
|
||||||
|
tools/install/get_fpc_full_version.sh svneol=native#text/plain
|
||||||
tools/install/get_lazarus_version.sh svneol=native#text/plain
|
tools/install/get_lazarus_version.sh svneol=native#text/plain
|
||||||
tools/install/get_svn_revision_number.sh svneol=native#text/plain
|
tools/install/get_svn_revision_number.sh svneol=native#text/plain
|
||||||
tools/install/linux/editoroptions.xml svneol=native#text/plain
|
tools/install/linux/editoroptions.xml svneol=native#text/plain
|
||||||
|
|||||||
@ -91,3 +91,4 @@ cat $SpecFileTemplate | \
|
|||||||
|
|
||||||
rpmbuild --target $ARCH -ba $SpecFile --nodeps
|
rpmbuild --target $ARCH -ba $SpecFile --nodeps
|
||||||
|
|
||||||
|
export FpcFullVersion=$LazVersion
|
||||||
@ -6,7 +6,7 @@ set -e
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# parse parameters
|
# parse parameters
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
Usage="Usage: $0 <LazarusSrcDir>"
|
Usage="Usage: $0 <LazarusSrcDir> <FPCFullVersion>"
|
||||||
|
|
||||||
LazSrcDir=$1
|
LazSrcDir=$1
|
||||||
shift
|
shift
|
||||||
@ -25,12 +25,21 @@ if [ ! -d $LazSrcDir/.svn ]; then
|
|||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
FpcFullVersion=$1
|
||||||
|
shift
|
||||||
|
if [ "x$FpcFullVersion" = "x" ]; then
|
||||||
|
echo $Usage
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Date=`date +%Y%m%d`
|
Date=`date +%Y%m%d`
|
||||||
# get fpc snapshot rpm
|
# get fpc snapshot rpm
|
||||||
RPMDIR=$(rpm/get_rpm_source_dir.sh)
|
RPMDIR=$(rpm/get_rpm_source_dir.sh)
|
||||||
ARCH=`rpm --eval "%{_arch}"`
|
ARCH=`rpm --eval "%{_arch}"`
|
||||||
LIB=`rpm --eval "%{_lib}"`
|
LIB=`rpm --eval "%{_lib}"`
|
||||||
FPCRPM=$RPMDIR/RPMS/$ARCH/fpc-2.2.0-$Date.$ARCH.rpm
|
FPCRPM=$RPMDIR/RPMS/$ARCH/fpc-$FpcFullVersion-$Date.$ARCH.rpm
|
||||||
if [ ! -f $FPCRPM ]; then
|
if [ ! -f $FPCRPM ]; then
|
||||||
echo ERROR: fpc rpm $FPCRPM not available
|
echo ERROR: fpc rpm $FPCRPM not available
|
||||||
exit
|
exit
|
||||||
@ -45,6 +54,7 @@ mkdir -p $TmpFPCDir
|
|||||||
cd $TmpFPCDir
|
cd $TmpFPCDir
|
||||||
rpm2cpio $FPCRPM | cpio -id
|
rpm2cpio $FPCRPM | cpio -id
|
||||||
FPCVersion=`usr/bin/fpc -iV`
|
FPCVersion=`usr/bin/fpc -iV`
|
||||||
|
FPCFullVersion=`usr/bin/fpc -iW`
|
||||||
usr/$LIB/fpc/$FPCVersion/samplecfg $TmpFPCDir/usr/$LIB/fpc/$FPCVersion .
|
usr/$LIB/fpc/$FPCVersion/samplecfg $TmpFPCDir/usr/$LIB/fpc/$FPCVersion .
|
||||||
FPCCfg=$TmpFPCDir/fpc.cfg
|
FPCCfg=$TmpFPCDir/fpc.cfg
|
||||||
export FPCCfg
|
export FPCCfg
|
||||||
@ -80,8 +90,8 @@ SpecFile=$RPMDIR/SPECS/lazarus-$LazVersion-$Date.spec
|
|||||||
cat rpm/lazarus.spec.template | \
|
cat rpm/lazarus.spec.template | \
|
||||||
sed -e "s/LAZVERSION/$LazVersion/g" \
|
sed -e "s/LAZVERSION/$LazVersion/g" \
|
||||||
-e "s/LAZRELEASE/$Date/g" \
|
-e "s/LAZRELEASE/$Date/g" \
|
||||||
-e "s/FPCVERSION/$FPCVersion/g" \
|
-e "s/FPCVERSION/$FPCFullVersion/g" \
|
||||||
-e "s/FPCSRCVERSION/$FPCVersion/g" \
|
-e "s/FPCSRCVERSION/$FPCFullVersion/g" \
|
||||||
> $SpecFile
|
> $SpecFile
|
||||||
|
|
||||||
# build rpm
|
# build rpm
|
||||||
|
|||||||
14
tools/install/get_fpc_full_version.sh
Executable file
14
tools/install/get_fpc_full_version.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# retrieve the version information
|
||||||
|
VersionFile="$1/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'`
|
||||||
|
CompilerMinorPatch=`cat $VersionFile | grep ' *minorpatch *=.*;' | sed -e 's/.*minorpatch.*= *//g' -e "s/'//g" -e 's/;//g'`
|
||||||
|
CompilerVersionStr="$CompilerVersion.$CompilerRelease.$CompilerPatch"
|
||||||
|
LazVersion="$CompilerVersion.$CompilerRelease.$CompilerPatch$CompilerMinorPatch"
|
||||||
|
|
||||||
|
echo $LazVersion
|
||||||
|
# end.
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user