fpc/fpc.spec
2005-12-21 14:41:57 +00:00

216 lines
6.7 KiB
RPMSpec

Name: fpc
Version: 2.0.2
Release: 3%{?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.bz2
Patch0: %{name}-%{version}-G5.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: gpm, glibc, ncurses, binutils
BuildRequires: fpc, 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 fully compatible with Turbo Pascal 7.0 and nearly Delphi compatible.
Some extensions are added to the language, like function overloading. Shared
libraries can be linked. This package contains commandline compiler and
utils. Provided units are the runtime library (RTL), free component library
(FCL) and bindings for among others gtk1, gtk2, ncurses, zlib, mysql, postgres
and ibase.
%package doc
Summary: Free Pascal Compiler - documentation and examples
Group: Development/Languages
%description doc
The fpc-doc package contains the documentation (in pdf format) and examples
of Freepascal.
%package src
Summary: Free Pascal Compiler - sources
Group: Development/Languages
%description src
The fpc-src package contains the sources of Freepascal, for documentation or
automatical-code generation purposes.
%ifarch ppc
%define ppcname ppcppc
%define smart _all
%else
%ifarch x86_64
%define ppcname ppcx64
%define smart _smart
%else
%define ppcname ppc386
%define smart _smart
%endif
%endif
%prep
%setup -q -n %{name}-src-%{version}
%patch0
%build
cd fpcsrc
STARTPP=%{ppcname}
NEWPP=`pwd`/compiler/%{ppcname}
NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
DATA2INC=`pwd`/utils/data2inc
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}
cd ..
export save_size=40000
export pool_size=1250000
make -C fpcdocs pdf FPC=${NEWPP} FPDOC=${NEWFPDOC}
# disable the debuginfo package
%define debug_package %{nil}
%define __spec_install_post /usr/lib/rpm/brp-compress
%install
rm -rf %{buildroot}
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 fcl_distinstall ${INSTALLOPTS}
make fv_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}
# create link
ln -sf ../%{_lib}/%{name}/%{version}/%{ppcname} %{buildroot}%{_bindir}/%{ppcname}
# Include the COPYING-information for the fcl/rtl in the documentation
cp -a fpcsrc/compiler/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING
cp -a fpcsrc/rtl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.rtl
cp -a fpcsrc/fcl/COPYING %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.fcl
cp -a fpcsrc/rtl/COPYING.FPC %{buildroot}%{_defaultdocdir}/%{name}-%{version}/COPYING.FPC
# The source-files:
mkdir -p %{buildroot}%{_datadir}/fpcsrc
rm -rf fpcsrc/packages/extra/amunits
rm -rf fpcsrc/packages/extra/winunits
cp -a fpcsrc/rtl %{buildroot}%{_datadir}/fpcsrc
cp -a fpcsrc/fcl %{buildroot}%{_datadir}/fpcsrc
cp -a fpcsrc/packages %{buildroot}%{_datadir}/fpcsrc
# Workaround:
# newer rpm versions do not allow garbage
# delete lexyacc
rm -rf %{buildroot}%{_libdir}/%{name}/lexyacc
%clean
rm -rf %{buildroot}
%post
# Create a version independent config
%{_libdir}/%{name}/%{version}/samplecfg %{_libdir}/%{name}/%{version} > /dev/null
%files
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/%{name}
%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,-)
%doc %{_defaultdocdir}/%{name}-%{version}/*.pdf
%doc %{_defaultdocdir}/%{name}-%{version}/examples
%files src
%defattr(-,root,root,-)
%{_datadir}/fpcsrc
%changelog
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-3
- Disabled smart-linking for ppc
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-2
- Updated fpc-2.0.2-G5.patch
* Tue Dec 20 2005 Joost van der Sluis <joost@cnoc.nl> 2.0.2-1
- Updated to version 2.0.2
* 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
* 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.