mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 19:55:09 +02:00
rpm build script: use full fpc version in file name (fpc-2.2.2rc1)
git-svn-id: trunk@15370 -
This commit is contained in:
parent
ac9c5de1ef
commit
9da100f931
@ -63,15 +63,16 @@ VersionFile="$TmpDir/compiler/version.pas"
|
|||||||
CompilerVersion=`cat $VersionFile | grep ' *version_nr *=.*;' | sed -e 's/[^0-9]//g'`
|
CompilerVersion=`cat $VersionFile | grep ' *version_nr *=.*;' | sed -e 's/[^0-9]//g'`
|
||||||
CompilerRelease=`cat $VersionFile | grep ' *release_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'`
|
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"
|
CompilerVersionStr="$CompilerVersion.$CompilerRelease.$CompilerPatch"
|
||||||
LazVersion="$CompilerVersion.$CompilerRelease.$CompilerPatch"
|
LazVersion="$CompilerVersion.$CompilerRelease.$CompilerPatch$CompilerMinorPatch"
|
||||||
|
|
||||||
# set version numbers in all Makefiles
|
# set version numbers in all Makefiles
|
||||||
perl replace_in_files.pl -sR -f '=\d.\d.\d' -r =$CompilerVersionStr -m 'Makefile(.fpc)?' $TmpDir/*
|
perl replace_in_files.pl -sR -f '=\d.\d.\d' -r =$LazVersion -m 'Makefile(.fpc)?' $TmpDir/*
|
||||||
|
|
||||||
# create a source tar.gz
|
# create a source tar.gz
|
||||||
cd $TmpDir/..
|
cd $TmpDir/..
|
||||||
tar -czf $RPMDIR/SOURCES/fpc-$CompilerVersionStr-$LazRelease.source.tar.gz fpc
|
tar -czf $RPMDIR/SOURCES/fpc-$LazVersion-$LazRelease.source.tar.gz fpc
|
||||||
|
|
||||||
# remove the tempdir
|
# remove the tempdir
|
||||||
cd -
|
cd -
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Name: fpc
|
Name: fpc
|
||||||
Version: 2.0.0
|
Version: 2.2.0
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Free Pascal Compiler
|
Summary: Free Pascal Compiler
|
||||||
|
|
||||||
@ -61,9 +61,6 @@ automatical-code generation purposes.
|
|||||||
# The source-files:
|
# The source-files:
|
||||||
mkdir -p fpcsrc
|
mkdir -p fpcsrc
|
||||||
cp -a rtl fpcsrc/
|
cp -a rtl fpcsrc/
|
||||||
if [ -d fcl ]; then
|
|
||||||
cp -a fcl fpcsrc/
|
|
||||||
fi
|
|
||||||
cp -a packages fpcsrc/
|
cp -a packages fpcsrc/
|
||||||
rm -rf packages/extra/amunits
|
rm -rf packages/extra/amunits
|
||||||
rm -rf packages/extra/winunits
|
rm -rf packages/extra/winunits
|
||||||
@ -75,14 +72,6 @@ NEWPP=`pwd`/compiler/%{ppcname}
|
|||||||
NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
|
NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
|
||||||
DATA2INC=`pwd`/utils/data2inc
|
DATA2INC=`pwd`/utils/data2inc
|
||||||
make clean all FPC=${STARTPP}
|
make clean all FPC=${STARTPP}
|
||||||
#make compiler_cycle FPC=${STARTPP}
|
|
||||||
#make rtl_clean rtl_smart FPC=${NEWPP}
|
|
||||||
#make packages_base_smart FPC=${NEWPP}
|
|
||||||
#make fcl_smart FPC=${NEWPP}
|
|
||||||
#make fv_smart FPC=${NEWPP}
|
|
||||||
#make packages_extra_smart FPC=${NEWPP}
|
|
||||||
#make ide_all FPC=${NEWPP}
|
|
||||||
#make utils_all FPC=${NEWPP} DATA2INC=${DATA2INC}
|
|
||||||
|
|
||||||
# disable the debuginfo package
|
# disable the debuginfo package
|
||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
@ -92,20 +81,19 @@ make clean all FPC=${STARTPP}
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
FPCMAKE=`pwd`/utils/fpcm/fpcmake
|
FPCMAKE=`pwd`/utils/fpcm/fpcmake
|
||||||
NEWPP=`pwd`/compiler/%{ppcname}
|
NEWPP=`pwd`/compiler/%{ppcname}
|
||||||
|
FPCVERSION=`${NEWPP} -iV`
|
||||||
|
FPCFULLVERSION=`${NEWPP} -iW`
|
||||||
INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} \
|
INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} \
|
||||||
INSTALL_PREFIX=%{buildroot}%{_prefix} \
|
INSTALL_PREFIX=%{buildroot}%{_prefix} \
|
||||||
INSTALL_LIBDIR=%{buildroot}%{_libdir} \
|
INSTALL_LIBDIR=%{buildroot}%{_libdir} \
|
||||||
INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/%{version} \
|
INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/${FPCVERSION} \
|
||||||
CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \
|
CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \
|
||||||
INSTALL_DOCDIR=%{buildroot}%{_defaultdocdir}/%{name}-%{version} \
|
INSTALL_DOCDIR=%{buildroot}%{_defaultdocdir}/%{name}-${FPCVERSION} \
|
||||||
INSTALL_BINDIR=%{buildroot}%{_bindir}
|
INSTALL_BINDIR=%{buildroot}%{_bindir}
|
||||||
INSTALL_EXAMPLEDIR=%{buildroot}%{_defaultdocdir}/%{name}-%{version}/examples"
|
INSTALL_EXAMPLEDIR=%{buildroot}%{_defaultdocdir}/%{name}-${FPCVERSION}/examples"
|
||||||
make compiler_install ${INSTALLOPTS}
|
make compiler_install ${INSTALLOPTS}
|
||||||
make rtl_install ${INSTALLOPTS}
|
make rtl_install ${INSTALLOPTS}
|
||||||
make packages_install ${INSTALLOPTS}
|
make packages_install ${INSTALLOPTS}
|
||||||
if [ -d fcl ]; then
|
|
||||||
make fcl_install ${INSTALLOPTS}
|
|
||||||
fi
|
|
||||||
#make fv_install ${INSTALLOPTS}
|
#make fv_install ${INSTALLOPTS}
|
||||||
#make ide_install ${INSTALLOPTS}
|
#make ide_install ${INSTALLOPTS}
|
||||||
make utils_install ${INSTALLOPTS}
|
make utils_install ${INSTALLOPTS}
|
||||||
@ -115,14 +103,14 @@ make utils_install ${INSTALLOPTS}
|
|||||||
#make man_install ${INSTALLOPTS} INSTALL_MANDIR=%{buildroot}%{_mandir}
|
#make man_install ${INSTALLOPTS} INSTALL_MANDIR=%{buildroot}%{_mandir}
|
||||||
|
|
||||||
# create link
|
# create link
|
||||||
ln -sf ../%{_lib}/%{name}/%{version}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}
|
ln -sf ../%{_lib}/%{name}/${FPCVERSION}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}
|
||||||
|
|
||||||
# Include the COPYING-information in the documentation
|
# Include the COPYING-information in the documentation
|
||||||
#cd fpcsrc
|
#cd fpcsrc
|
||||||
#cp -a compiler/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING
|
#cp -a compiler/COPYING %{buildroot}%{_defaultdocdir}/%{name}-${FPCVERSION}/COPYING
|
||||||
#cp -a rtl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.rtl
|
#cp -a rtl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-${FPCVERSION}/COPYING.rtl
|
||||||
#cp -a fcl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.fcl
|
#cp -a fcl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-${FPCVERSION}/COPYING.fcl
|
||||||
#cp -a rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.FPC
|
#cp -a rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}-${FPCVERSION}/COPYING.FPC
|
||||||
#cd -
|
#cd -
|
||||||
|
|
||||||
# The source-files:
|
# The source-files:
|
||||||
@ -139,23 +127,23 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
# Create a version independent config
|
# Create a version independent config
|
||||||
%{_libdir}/%{name}/%{version}/samplecfg %{_libdir}/%{name}/%{version} > /dev/null
|
%{_libdir}/%{name}/${FPCVERSION}/samplecfg %{_libdir}/%{name}/${FPCVERSION} > /dev/null
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/NEWS
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/NEWS
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/README
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/README
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/readme.ide
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/readme.ide
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/faq*
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/faq*
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/COPYING*
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/COPYING*
|
||||||
#%{_mandir}/*/*
|
#%{_mandir}/*/*
|
||||||
|
|
||||||
#%files doc
|
#%files doc
|
||||||
#%defattr(-,root,root,-)
|
#%defattr(-,root,root,-)
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/*.pdf
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/*.pdf
|
||||||
#%doc %{_defaultdocdir}/%{name}-%{version}/examples
|
#%doc %{_defaultdocdir}/%{name}-${FPCVERSION}/examples
|
||||||
|
|
||||||
%files src
|
%files src
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
Loading…
Reference in New Issue
Block a user