- 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
This commit is contained in:
Joost van der Sluis 2007-10-15 20:08:16 +00:00
parent 3726225665
commit fbc2525dc5
3 changed files with 80 additions and 54 deletions

View File

@ -1 +1,3 @@
fpcbuild-2.0.4.zip
fpcbuild-2.2.0.tar.gz
fpc-2.2.0-samplecfg_32and64bit.patch
fpc-2.2.0.compiler.bin.tar.gz

116
fpc.spec
View File

@ -1,12 +1,22 @@
%ifarch ppc64
%define useprebuiltcompiler 1
%else
%define useprebuiltcompiler 0
%endif
Name: fpc
Version: 2.0.4
Release: 2%{?dist}
Version: 2.2.0
Release: 1%{?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}.zip
Source0: ftp://ftp.freepascal.org/pub/fpc/dist/source-%{version}/%{name}build-%{version}.tar.gz
%if %{useprebuiltcompiler}
Source1: http://www.cnoc.nl/fpc/%{name}-%{version}.compiler.bin.tar.gz
%endif
Patch0: %{name}-%{version}-samplecfg_32and64bit.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: gpm, glibc, ncurses, binutils
@ -15,16 +25,15 @@ BuildRequires: fpc, tetex, tetex-latex, tetex-fonts, binutils, gpm-devel, glibc
%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.
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: Free Pascal Compiler - documentation and examples
Group: Development/Languages
Summary: Freepascal Compiler - documentation and examples
Group: Documentation
%description doc
@ -32,7 +41,7 @@ The fpc-doc package contains the documentation (in pdf format) and examples
of Freepascal.
%package src
Summary: Free Pascal Compiler - sources
Summary: Freepascal Compiler - sources
Group: Development/Languages
%description src
@ -40,49 +49,58 @@ Group: Development/Languages
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 smart _all
%else
%ifarch x86_64
%define ppcname ppcx64
%define smart _smart
%else
%ifarch ppc64
%define ppcname ppcppc64
%else
%define ppcname ppc386
%define smart _smart
%endif
%endif
%endif
%prep
%setup -n fpcbuild_%{version}_exp
%if %{useprebuiltcompiler}
%setup -a1 -n fpcbuild-%{version} -q
%else
%setup -n fpcbuild-%{version} -q
%endif
%patch0
%build
cd fpcsrc
# 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 %{useprebuiltcompiler}
STARTPP=`pwd`/startcompiler/%{ppcname}
%else
STARTPP=%{ppcname}
%endif
cd fpcsrc
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}
make compiler_cycle FPC=${STARTPP} OPT='-gl'
make rtl_clean rtl%{smart} FPC=${NEWPP} OPT='-gl'
make packages_base%{smart} FPC=${NEWPP} OPT='-gl'
make packages_fcl%{smart} FPC=${NEWPP} OPT='-gl'
make fv%{smart} FPC=${NEWPP} OPT='-gl'
make packages_extra%{smart} FPC=${NEWPP} OPT='-gl'
make ide_all FPC=${NEWPP} OPT='-gl'
make utils_all FPC=${NEWPP} DATA2INC=${DATA2INC} OPT='-gl'
cd ..
# fpdoc version 2.0.4 crashes on powerpc, so use an older version
%ifarch ppc
make -C fpcdocs pdf FPC=${NEWPP} FPDOC=/usr/bin/fpdoc
%else
make -C fpcdocs pdf FPC=${NEWPP} FPDOC=${NEWFPDOC}
%endif
# disable the debuginfo package
%define debug_package %{nil}
%define __spec_install_post /usr/lib/rpm/brp-compress
%install
rm -rf %{buildroot}
@ -100,7 +118,6 @@ INSTALLOPTS="FPC=${NEWPP} FPCMAKE=${FPCMAKE} \
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}
@ -113,19 +130,17 @@ 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
# 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
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
cp -a fpc_src/* %{buildroot}%{_datadir}/fpcsrc/
# Workaround:
# newer rpm versions do not allow garbage
@ -135,15 +150,12 @@ 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}
%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
@ -153,6 +165,7 @@ rm -rf %{buildroot}
%files doc
%defattr(-,root,root,-)
%dir %{_defaultdocdir}/%{name}-%{version}/
%doc %{_defaultdocdir}/%{name}-%{version}/*.pdf
%doc %{_defaultdocdir}/%{name}-%{version}/examples
@ -161,6 +174,15 @@ rm -rf %{buildroot}
%{_datadir}/fpcsrc
%changelog
* 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

View File

@ -1 +1,3 @@
2f7389fd46a27082f753f60c1f545830 fpcbuild-2.0.4.zip
0869cfd07d012b702ff08c0a4196624b fpcbuild-2.2.0.tar.gz
01fb41d3a6b0536939f63d684d916e5f fpc-2.2.0-samplecfg_32and64bit.patch
d78b19b59457bb98dacb6e3267fe3714 fpc-2.2.0.compiler.bin.tar.gz