%define bootstrap 1 %define smart _smart %define fpcdebugopt -gl #%define ppcname ppcppc #%else #%ifarch x86_64 #%define ppcname ppcx64 #%else #%ifarch ppc64 #%else #%define ppcname ppc386 #%endif #%endif #%endif %define ppcname ppc386 %define fpcopt -k"--build-id" Name: fpc Version: 2.4.0 Release: 2mamba Summary: The FreePascal Compiler Group: Applications/Development Vendor: openmamba Distribution: openmamba Packager: gil URL: http://www.freepascal.org/ Source0: ftp://ftp.freepascal.org/pub/fpc/dist/%{version}/source/fpcbuild-%{version}.tar.gz Patch0: fpc-2.2.4-samplecfg_32and64bit.patch Patch1: fpc-2.2.4-build-id.patch License: GPL, LGPL %if %bootstrap BuildRequires: fpc-bootstrap = %{version} %endif BuildRequires: glibc-devel BuildRequires: libncurses-devel BuildRequires: tetex BuildRequires: tetex-fonts BuildRequires: tetex-latex Requires: gpm Obsoletes: fpc-bootstrap Provides: fpc-bootstrap BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Freepascal is a free 32/64bit Pascal Compiler. It comes with a run-time library and is fully compatible with Turbo Pascal 7.0 and nearly Delphi compatible. Some extensions are added to the language, like function overloading and generics. Shared libraries can be linked. This package contains commandline compiler and utils. Provided units are the runtime library (RTL), free component library (FCL) and the base and extra packages. %package doc Summary: Freepascal Compiler - documentation and examples Group: Documentation %description doc Freepascal is a free 32/64bit Pascal Compiler. This package contains the documentation (in pdf format) and examples of Freepascal. %package src Summary: Freepascal Compiler - sources Group: Development/Languages %description src This package contains the sources of Freepascal, for documentation or automatical-code generation purposes. %prep %setup -n fpcbuild-%{version} -q %patch0 %patch1 %build mkdir -p fpc_src cp -a fpcsrc/rtl fpc_src cp -a fpcsrc/packages fpc_src rm -rf fpc_src/packages/extra/amunits rm -rf fpc_src/packages/extra/winunits STARTPP=%{ppcname} cd fpcsrc NEWPP=`pwd`/compiler/%{ppcname} NEWFPDOC=`pwd`/utils/fpdoc/fpdoc DATA2INC=`pwd`/utils/data2inc %make compiler_cycle FPC=${STARTPP} OPT='%{fpcopt} %{fpcdebugopt}' %make rtl_clean rtl%{smart} FPC=${NEWPP} OPT='%{fpcopt}' %make packages%{smart} FPC=${NEWPP} OPT='%{fpcopt}' %make ide_all FPC=${NEWPP} OPT='%{fpcopt} %{fpcdebugopt}' %make utils_all FPC=${NEWPP} DATA2INC=${DATA2INC} OPT='%{fpcopt} %{fpcdebugopt}' cd .. make -j1 -C fpcdocs pdf FPC=${NEWPP} FPDOC=${NEWFPDOC} %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" cd fpcsrc FPCMAKE=`pwd`/utils/fpcm/fpcmake NEWPP=`pwd`/compiler/%{ppcname} INSTALLOPTS="-j1 FPC=${NEWPP} FPCMAKE=${FPCMAKE} \ INSTALL_PREFIX=%{buildroot}%{_prefix} \ INSTALL_LIBDIR=%{buildroot}%{_libdir} \ INSTALL_BASEDIR=%{buildroot}%{_libdir}/fpc/%{version} \ CODPATH=%{buildroot}%{_libdir}/fpc/lexyacc \ INSTALL_DOCDIR=%{buildroot}%{_defaultdocdir}/fpc-%{version} \ INSTALL_BINDIR=%{buildroot}%{_bindir} INSTALL_EXAMPLEDIR=%{buildroot}%{_defaultdocdir}/fpc-%{version}/examples" make compiler_distinstall ${INSTALLOPTS} make rtl_distinstall ${INSTALLOPTS} make packages_distinstall ${INSTALLOPTS} make ide_distinstall ${INSTALLOPTS} make utils_distinstall ${INSTALLOPTS} cd ../install make -C doc ${INSTALLOPTS} make -C man ${INSTALLOPTS} INSTALL_MANDIR=%{buildroot}%{_mandir} cd .. make -C fpcdocs pdfinstall ${INSTALLOPTS} ln -sf ../lib/fpc/%{version}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname} # Create a version independent config %{buildroot}%{_libdir}/fpc/%{version}/samplecfg %{_exec_prefix} %{buildroot}%{_sysconfdir} %{buildroot}%{_exec_prefix} # Include the COPYING-information for the compiler/rtl/fcl in the documentation cp -a fpcsrc/compiler/COPYING.txt %{buildroot}%{_defaultdocdir}/fpc-%{version}/COPYING cp -a fpcsrc/rtl/COPYING.txt %{buildroot}%{_defaultdocdir}/fpc-%{version}/COPYING.rtl cp -a fpcsrc/rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/fpc-%{version}/COPYING.FPC # The source-files: mkdir -p %{buildroot}%{_datadir}/fpcsrc cp -a fpc_src/* %{buildroot}%{_datadir}/fpcsrc/ # Workaround: # newer rpm versions do not allow garbage # delete lexyacc rm -rf %{buildroot}%{_libdir}/fpc/lexyacc %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/fpc.cfg %{_bindir}/bin2obj %{_bindir}/chmcmd %{_bindir}/chmls %{_bindir}/data2inc %{_bindir}/delp %{_bindir}/fd2pascal %{_bindir}/fp %{_bindir}/fpc %{_bindir}/fpclasschart %{_bindir}/fpcmake %{_bindir}/fpcmkcfg %{_bindir}/fpcres %{_bindir}/fpcsubst %{_bindir}/fpdoc %{_bindir}/fppkg %{_bindir}/fprcp %{_bindir}/grab_vcsa %{_bindir}/h2pas %{_bindir}/h2paspp %{_bindir}/makeskel %{_bindir}/mkarmins %{_bindir}/mkx86ins %{_bindir}/mkxmlrpc %{_bindir}/plex %{_bindir}/postw32 %{_bindir}/%{ppcname} %{_bindir}/ppdep %{_bindir}/ppudump %{_bindir}/ppufiles %{_bindir}/ppumove %{_bindir}/ptop %{_bindir}/pyacc %{_bindir}/rmcvsdir %{_bindir}/rstconv %{_bindir}/unitdiff %dir %{_libdir}/fpc/%{version} %{_libdir}/fpc/%{version}/* %{_mandir}/man1/*.1.gz %{_mandir}/man5/*.5.gz %dir %{_defaultdocdir}/fpc-%{version}/ %doc %{_defaultdocdir}/fpc-%{version}/NEWS %doc %{_defaultdocdir}/fpc-%{version}/README %doc %{_defaultdocdir}/fpc-%{version}/readme.ide %doc %{_defaultdocdir}/fpc-%{version}/faq* %doc %{_defaultdocdir}/fpc-%{version}/COPYING* %files doc %defattr(-,root,root) %dir %{_defaultdocdir}/fpc-%{version} %doc %{_defaultdocdir}/fpc-%{version}/*.pdf %doc %{_defaultdocdir}/fpc-%{version}/examples %files src %defattr(-,root,root) %{_datadir}/fpcsrc %changelog * Fri Aug 13 2010 gil 2.4.0-2mamba - rebuilt * Fri Aug 13 2010 gil 2.4.0-1mamba - bootstrap