fpc/fpc.spec

297 lines
9.4 KiB
RPMSpec
Raw Normal View History

%ifarch ppc64
%define useprebuiltcompiler 1
%endif
Name: fpc
Version: 2.2.0
2007-10-17 15:05:08 +00:00
Release: 10%{?dist}
Summary: Free Pascal Compiler
Group: Development/Languages
License: GPL and modified LGPL
URL: http://www.freepascal.org/
Source0: ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}build-%{version}.tar.gz
# This is only needed when useprebuiltcompiler is defined.
# But it's not in an 'if defined' block, since the file has to be included in the srpm
Source1: http://www.cnoc.nl/fpc/%{name}-%{version}.compiler.bin.tar.gz
Patch0: %{name}-%{version}-samplecfg_32and64bit.patch
2007-10-16 13:48:53 +00:00
Patch1: %{name}-%{version}-build-id.patch
Patch2: %{name}-%{version}-fpcdocs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: gpm, glibc, ncurses, binutils
%if ! %{defined useprebuiltcompiler}
BuildRequires: fpc
%endif
BuildRequires: tetex, tetex-latex, tetex-fonts, binutils, gpm-devel, glibc-devel
%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
The fpc-doc package contains the documentation (in pdf format) and examples
of Freepascal.
%package src
Summary: Freepascal Compiler - sources
Group: Development/Languages
%description src
The fpc-src package contains the sources of Freepascal, for documentation or
automatical-code generation purposes.
%define smart _smart
%ifarch ppc
%define ppcname ppcppc
%define fpcopt '-k--build-id -gl'
%else
%ifarch x86_64
%define ppcname ppcx64
%define fpcopt '-k--build-id -gl'
%else
%ifarch ppc64
%define ppcname ppcppc64
%define fpcopt '-k--build-id'
%else
%define ppcname ppc386
%define fpcopt '-k--build-id -gl'
%endif
%endif
%endif
%prep
%if %{defined useprebuiltcompiler}
%setup -a1 -n fpcbuild-%{version} -q
%else
%setup -n fpcbuild-%{version} -q
%endif
%patch0
2007-10-16 13:48:53 +00:00
%patch1
%patch2
%build
# The source-files:
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
%if %{defined useprebuiltcompiler}
STARTPP=`pwd`/startcompiler/%{ppcname}
%else
2005-12-21 11:07:45 +00:00
STARTPP=%{ppcname}
%endif
cd fpcsrc
NEWPP=`pwd`/compiler/%{ppcname}
NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
DATA2INC=`pwd`/utils/data2inc
make compiler_cycle FPC=${STARTPP} OPT=%{fpcopt}
make rtl_clean rtl%{smart} FPC=${NEWPP} OPT=%{fpcopt}
make packages_base%{smart} FPC=${NEWPP} OPT=%{fpcopt}
make packages_fcl%{smart} FPC=${NEWPP} OPT=%{fpcopt}
make fv%{smart} FPC=${NEWPP} OPT=%{fpcopt}
make packages_extra%{smart} FPC=${NEWPP} OPT=%{fpcopt}
make ide_all FPC=${NEWPP} OPT=%{fpcopt}
make utils_all FPC=${NEWPP} DATA2INC=${DATA2INC} OPT=%{fpcopt}
%ifarch x86_64
# Debugedit crashes on this file, if it has debug-info.
# As a temporary solution, strip the debug-info.
%__strip utils/h2pas/h2pas
%__strip utils/grab_vcsa
%__strip compiler/utils/ppudump
%__strip packages/fcl-net/mkxmlrpc
%endif
2005-12-21 11:07:45 +00:00
cd ..
make -C fpcdocs pdf FPC=${NEWPP} FPDOC=${NEWFPDOC}
%install
rm -rf %{buildroot}
2005-12-21 11:07:45 +00:00
cd fpcsrc
FPCMAKE=`pwd`/utils/fpcm/fpcmake
NEWPP=`pwd`/compiler/%{ppcname}
INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} \
INSTALL_PREFIX=%{buildroot}%{_prefix} \
INSTALL_LIBDIR=%{buildroot}%{_libdir} \
INSTALL_BASEDIR=%{buildroot}%{_libdir}/%{name}/%{version} \
CODPATH=%{buildroot}%{_libdir}/%{name}/lexyacc \
INSTALL_DOCDIR=%{buildroot}%{_defaultdocdir}/%{name}-%{version} \
INSTALL_BINDIR=%{buildroot}%{_bindir}
INSTALL_EXAMPLEDIR=%{buildroot}%{_defaultdocdir}/%{name}-%{version}/examples"
make compiler_distinstall ${INSTALLOPTS}
make rtl_distinstall ${INSTALLOPTS}
make packages_distinstall ${INSTALLOPTS}
make fv_distinstall ${INSTALLOPTS}
make ide_distinstall ${INSTALLOPTS}
make utils_distinstall ${INSTALLOPTS}
2005-12-21 11:07:45 +00:00
cd ../install
make -C doc ${INSTALLOPTS}
make -C man ${INSTALLOPTS} INSTALL_MANDIR=%{buildroot}%{_mandir}
cd ..
make -C fpcdocs pdfinstall ${INSTALLOPTS}
# create link
ln -sf ../%{_lib}/%{name}/%{version}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}
# Create a version independent config
%{buildroot}/%{_libdir}/%{name}/%{version}/samplecfg %{_exec_prefix}/. %{buildroot}%{_sysconfdir}
# Include the COPYING-information for the compiler/rtl/fcl in the documentation
2005-12-21 11:07:45 +00:00
cp -a fpcsrc/compiler/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING
cp -a fpcsrc/rtl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.rtl
cp -a fpcsrc/rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}-%{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}/%{name}/lexyacc
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}.cfg
%dir %{_defaultdocdir}/%{name}-%{version}/
%doc %{_defaultdocdir}/%{name}-%{version}/NEWS
%doc %{_defaultdocdir}/%{name}-%{version}/README
%doc %{_defaultdocdir}/%{name}-%{version}/readme.ide
%doc %{_defaultdocdir}/%{name}-%{version}/faq*
%doc %{_defaultdocdir}/%{name}-%{version}/COPYING*
%{_mandir}/*/*
%files doc
%defattr(-,root,root,-)
%dir %{_defaultdocdir}/%{name}-%{version}/
%doc %{_defaultdocdir}/%{name}-%{version}/*.pdf
%doc %{_defaultdocdir}/%{name}-%{version}/examples
%files src
%defattr(-,root,root,-)
%{_datadir}/fpcsrc
%changelog
2007-10-17 15:05:08 +00:00
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-10
- Strip the debuginfo from grab_vcsa and ppudump, since debugedit chokes on it
- Only strip debugdata on x86_64
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-9
- Strip the debuginfo from mkxmlrpc, since debugedit chokes on it
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-8
- Strip the debuginfo from h2pas, since debugedit chokes on it
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-7
- Include the startcompiler on all targets, for the srpm-building
2007-10-16 21:37:48 +00:00
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-6
- Disabled debuginfo for ppc64 only
- Enabled smart-linking on ppc64
- Added a patch for building documentation without fpc already installed
2007-10-16 18:41:35 +00:00
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-5
- Disabled debuginfo
2007-10-16 13:48:53 +00:00
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-4
- Enabled BuildId, added it to fpc.cfg
2007-10-16 09:36:06 +00:00
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-3
- Disabled smart-linking on ppc64
* Mon Oct 16 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-2
- Buildrequirement fpc is not needed when using a pre-built compiler binary
* Sun Oct 14 2007 Joost van der Sluis <joost@cnoc.nl> 2.2.0-1
- Updated to version 2.2.0
- Updated description
- Enabled smart-linking for ppc
- Do not include the built binary-files in fpc-src
- Added support for ppc64
- Added support to configuration file for dual 32/64 bit installations
- Fixed and enabled debug-package
* Sat Sep 16 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.4-2
- Fixed documentation building on powerpc
* Fri Sep 15 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.4-1
- Updated to version 2.0.4
2006-03-01 10:07:28 +00:00
* Wed Mar 1 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.2-4
2006-03-01 10:05:07 +00:00
- Rebuild for Fedora Extras 5
2005-12-21 14:41:57 +00:00
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-3
- Disabled smart-linking for ppc
2005-12-21 11:16:51 +00:00
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-2
- Updated fpc-2.0.2-G5.patch
2005-12-21 11:07:45 +00:00
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-1
- Updated to version 2.0.2
2005-08-17 16:33:51 +00:00
* Wed Aug 17 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-4
- Added %%{?dist} to release.
* Wed Aug 17 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-3
- replaced the ppcpcc-2.1.1 startcompilercompiler for the
ppcppc-2.0.0 startcompiler
2005-08-17 14:17:59 +00:00
* Wed Aug 17 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-2
- Added a patch for compilation on POWER5, and provided
the new ppcppc binary/startcompiler
* Fri Aug 5 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-1
- Removed gpm-devel requirement
- Fixed a type in the -src description
* Tue Jul 28 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-1
- Added some requirements
- Added COPYING-info to %%doc
* Tue Jun 28 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.6
- Only rtl, fcl and packages are added to src-subpackage
- Silenced post-script
- disabled the debuginfo-package
* Sat Jun 5 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.5
- Added doc-subpackage
- Added src-subpackage
* Fri Jun 3 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.4
- New fix for lib64 on x86_64
- small patches from Jens Petersen <petersen@redhat.com>
* Thu May 26 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.3
- replaced 'lib' and 'lib64' by %%{_lib}
* Tue May 24 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.2
- Fixed for lib64 on x86_64
- Changed summary, description and license
- Removed examples from installation
- Make clean removed from clean-section
- Clean-up
- replaced $RPM_BUILD_ROOT by %%{buildroot}
* Mon May 23 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.0-0.1
- Initial build.