rpm build script: fixed using fpc version number when running samplecfg (bug #11461)

git-svn-id: trunk@15377 -
This commit is contained in:
vincents 2008-06-10 22:34:56 +00:00
parent d8ea030583
commit 84fba8eb85
3 changed files with 6 additions and 2 deletions

View File

@ -85,6 +85,7 @@ SpecFile=$RPMDIR/SPECS/fpc.spec
cat $SpecFileTemplate | \
sed -e 's/^Version: .*/Version: '"$LazVersion/" \
-e 's/^Release: .*/Release: '"$LazRelease/" \
-e 's/^%define fpcversion .*/%define fpcversion '"$CompilerVersionStr/" \
> $SpecFile
# -e 's/\(%define builddocdir.*\)/%define __strip smart_strip.sh\n\n\1/' \
# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \

View File

@ -148,6 +148,7 @@ else
cat $SpecFileTemplate | \
sed -e 's/^Version: .*/Version: '"$FPCVersion/" \
-e 's/^Release: .*/Release: '"$FPCRelease/" \
-e 's/^%define fpcversion .*/%define fpcversion '"$FPCVersion/" \
> $SpecFile
# -e 's/\(%define builddocdir.*\)/%define __strip smart_strip.sh\n\n\1/' \
# -e 's/^\%{fpcdir}\/samplecfg .*/%{fpcdir}\/samplecfg %{_libdir}\/fpc\/\\\$version/' \

View File

@ -80,10 +80,11 @@ make clean all FPC=${STARTPP}
%install
rm -rf %{buildroot}
FPCMAKE=`pwd`/utils/fpcm/fpcmake
DATA2INC=`pwd`/utils/data2inc
NEWPP=`pwd`/compiler/%{ppcname}
FPCVERSION=`${NEWPP} -iV`
FPCFULLVERSION=`${NEWPP} -iW`
INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} \
INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} DATA2INC=${DATA2INC} \
INSTALL_PREFIX=%{buildroot}%{_prefix} \
INSTALL_LIBDIR=%{buildroot}%{_libdir} \
INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/${FPCVERSION} \
@ -127,7 +128,8 @@ rm -rf %{buildroot}
%post
# Create a version independent config
%{_libdir}/%{name}/${FPCVERSION}/samplecfg %{_libdir}/%{name}/${FPCVERSION} > /dev/null
%define fpcversion 2.2.0
%{_libdir}/%{name}/%{fpcversion}/samplecfg %{_libdir}/%{name}/%{fpcversion} > /dev/null
%files
%defattr(-,root,root,-)