mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 02:59:08 +02:00
added fully automatic lazarus rpm script
git-svn-id: trunk@3941 -
This commit is contained in:
parent
30e90554ca
commit
3718772876
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -829,7 +829,8 @@ tools/install/create_fpc_rpm.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_fpcsrc_deb.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_lazarus_deb.sh -text svneol=native#application/x-sh
|
||||
tools/install/create_lazarus_snapshot_tgz.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_lazarus_tgz_from_local_dir.sh -text svneol=native#application/x-sh
|
||||
tools/lazarusmake.ini svneol=native#text/plain
|
||||
tools/lazres.lpi svneol=native#text/plain
|
||||
|
45
tools/install/create_lazarus_rpm.sh
Normal file
45
tools/install/create_lazarus_rpm.sh
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
#set -x
|
||||
set -e
|
||||
|
||||
# get date of day
|
||||
Year=`date +%y`
|
||||
Month=`date +%m`
|
||||
Day=`date +%d`
|
||||
|
||||
# get installed fpc version
|
||||
FPCRPM=`rpm -qa | egrep '^fpc-'`
|
||||
if [ "x$FPCRPM" = "x" ]; then
|
||||
echo ERROR: fpc rpm not installed
|
||||
exit
|
||||
fi
|
||||
|
||||
Date=20$Year$Month$Day
|
||||
LazVersion=0.8.5.1
|
||||
LazRelease=$FPCRPM
|
||||
LazRelease=`echo $FPCRPM | sed -e 's/-/_/g'`
|
||||
SrcTGZ=lazarus-$Date.tgz
|
||||
TmpDir=/tmp/lazarus$LazVersion
|
||||
SpecFile=lazarus-$LazVersion-$LazRelease.spec
|
||||
|
||||
# download lazarus cvs if necessary
|
||||
if [ ! -f $SrcTGZ ]; then
|
||||
./create_lazarus_export_tgz.sh $SrcTGZ
|
||||
fi
|
||||
|
||||
# put src tgz into rpm build directory
|
||||
cp $SrcTGZ /usr/src/redhat/SOURCES/
|
||||
|
||||
# create spec file
|
||||
cat lazarus.spec | \
|
||||
sed -e "s/LAZVERSION/$LazVersion/g" \
|
||||
-e "s/LAZRELEASE/$LazRelease/" \
|
||||
-e "s/LAZSOURCE/$SrcTGZ/" \
|
||||
> $SpecFile
|
||||
|
||||
# build rpm
|
||||
rpm -ba $SpecFile || rpmbuild -ba $SpecFile
|
||||
|
||||
# end.
|
||||
|
Loading…
Reference in New Issue
Block a user