added fully automatic lazarus rpm script

git-svn-id: trunk@3941 -
This commit is contained in:
mattias 2003-03-16 16:37:31 +00:00
parent 30e90554ca
commit 3718772876
3 changed files with 47 additions and 1 deletions

3
.gitattributes vendored
View File

@ -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

View 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.