rpm: added option chmhelp

git-svn-id: trunk@37797 -
This commit is contained in:
mattias 2012-06-27 12:29:31 +00:00
parent 335676643d
commit 396e71ec7e
3 changed files with 48 additions and 8 deletions

View File

@ -144,6 +144,9 @@ strip tools/lazres
strip tools/updatepofiles
strip tools/lrstolfm
strip tools/svn2revisioninc
if [ "$UseCHMHelp" = "1" ]; then
strip components/chmhelp/lhelp/lhelp
fi
cd -
# create control file

View File

@ -1,9 +1,38 @@
#!/bin/bash
#
# Author: Mattias Gaertner
#
# Usage: ./create_lazarus_rpm.sh [chmhelp]
#
# Options:
# chmhelp add package chmhelp and add chm,kwd,xct,txt files in docs/chm
#
# Note: To create an rpm as normal user, see the script rpm/create_nonroot_rpmmacros.sh
set -x
set -e
UseCHMHelp=
while [ $# -gt 0 ]; do
echo "param=$1"
case "$1" in
chmhelp)
echo "using package chmhelp"
UseCHMHelp=1
;;
*)
echo "invalid parameter $1"
echo "Usage: ./create_lazarus_rpm.sh [chmhelp]"
exit 1
;;
esac
shift
done
set -x
# get date of day
Year=$(date +%y)
Month=$(date +%m)
@ -27,6 +56,7 @@ LazRelease='0' # $(echo $FPCRPM | sed -e 's/-/_/g')
RPMSrcDir=$(./rpm/get_rpm_source_dir.sh)
Src=lazarus-$LazVersion-$LazRelease.tar.gz
SrcTGZ=$RPMSrcDir/SOURCES/$Src
SrcTGZOpts=
SpecFile=rpm/lazarus-$LazVersion-$LazRelease.spec
Arch=$(rpm --eval "%{_arch}")
@ -34,18 +64,22 @@ Arch=$(rpm --eval "%{_arch}")
# download lazarus svn if needed
echo "creating lazarus tgz ..."
#if [ ! -f $SrcTGZ ]; then
sh create_lazarus_export_tgz.sh $SrcTGZ
if [ "$UseCHMHelp" = "1" ]; then SrcTGZOpts="chmhelp"; fi
sh create_lazarus_export_tgz.sh $SrcTGZOpts $SrcTGZ
#fi
# create spec file
echo "creating lazarus spec file ..."
CHMCOMMENT="% "
if [ "$UseCHMHelp" = "1" ]; then CHMCOMMENT=""; fi
cat rpm/lazarus.spec.template | \
sed -e "s/LAZVERSION/$LazVersion/g" \
-e "s/LAZRELEASE/$LazRelease/g" \
-e "s/LAZSOURCE/$Src/g" \
-e "s/FPCBUILDVERSION/2.2.2/g" \
-e "s/FPCBUILDVERSION/2.6.1/g" \
-e "s/FPCVERSION/$FPCRPMVersion/g" \
-e "s/FPCSRCVERSION/$FPCSRCRPMVersion/g" \
-e "s/%CHMHELP:/$CHMCOMMENT/" \
> $SpecFile
# build rpm

View File

@ -33,16 +33,17 @@ MAKEOPTS="-Fl/opt/gnome/lib"
if [ -n "$FPCCfg" ]; then
MAKEOPTS="$MAKEOPTS -n @$FPCCfg"
fi
%CHMHELP:MAKEOPTS="$MAKEOPTS -dUseCHMHelp"
make bigide OPT="$MAKEOPTS" USESVN2REVISIONINC=0
make tools OPT="$MAKEOPTS"
make lazbuild OPT="$MAKEOPTS"
# build gtk2 .ppu
export LCL_PLATFORM=gtk2
make lcl ideintf packager/registration bigidecomponents OPT="$MAKEOPTS"
export LCL_PLATFORM=
strip lazarus
strip startlazarus
strip lazbuild
strip tools/lazres
strip tools/updatepofiles
strip tools/lrstolfm
strip tools/svn2revisioninc
%CHMHELP:strip components/chmhelp/lhelp/lhelp
%install
[ %{buildroot} != "/" ] && ( rm -rf %{buildroot} )
@ -91,6 +92,8 @@ update-desktop-database &> /dev/null ||:
%{_mandir}/*/*
%changelog
* Mon Jun 21 2012 Mattias Gaertner <mattias@freepascal.org> 1.0-0
- 128x128 icon, chmhelp
* Sat Sep 9 2006 Mattias Gaertner <mattias@freepascal.org> 0.9.18-0
- Initial build.
* Wed Jul 20 2005 Joost van der Sluis <joost@cnoc.nl> 0.9.8-0.1