All pastes #733535 Raw Edit

Zeug

public text v1 · immutable
·published 2007-10-11 21:42 UTC
rendered paste body
Name:           fpc
Version:        2.2.0
Release:        0
Summary:        Free Pascal Compiler
Group:          Development/Languages
License:        GPL and modified LGPL
URL:            http://www.freepascal.org/
Source:         %{name}build-%{version}.tar.gz
BuildRoot:      %{_tmppath}/build-%{name}-%{version}
Requires:	gpm binutils
BuildRequires:  fpc texlive-latex ncurses-devel binutils glibc-devel make

%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 -c

%build
%__cd "fpcbuild-%{version}/fpcsrc"
STARTPP="%{ppcname}"
NEWPP="`pwd`/compiler/%{ppcname}"
NEWFPDOC="`pwd`/utils/fpdoc/fpdoc"
DATA2INC="`pwd`/utils/data2inc"
COMPILEOPTS="-XLAtinfo= "
%__make %{?jobs:-j%{jobs}} compiler_cycle FPC="${STARTPP}"
%__make %{?jobs:-j%{jobs}} "rtl_clean rtl%{smart}" FPC="${NEWPP}"
%__make %{?jobs:-j%{jobs}} "packages_base%{smart}" FPC="${NEWPP}"
%__make %{?jobs:-j%{jobs}} "packages_fcl%{smart}" FPC="${NEWPP}"
%__make %{?jobs:-j%{jobs}} "fv%{smart}" FPC="${NEWPP}"
%__make %{?jobs:-j%{jobs}} "packages_extra%{smart}" FPC="${NEWPP}"
%__make %{?jobs:-j%{jobs}} ide_all OPT="${COMPILEOPTS}" FPC="${NEWPP}"
%__make %{?jobs:-j%{jobs}} utils_all FPC="${NEWPP}" DATA2INC="${DATA2INC}"

%__cd ..
# fpdoc version 2.2.0 crashes on powerpc, so use an older version
%ifarch ppc
  %__make -C fpcdocs pdf FPC="${NEWPP}" FPDOC="%{_bindir}/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
cd "fpcbuild-%{version}/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_s -f "../%{_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
* Thu Oct 11 2007 Alexander Schaber 2.2.0-0
- Ported to openSUSE Build Service
- Updated to version 2.2.0

* 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

* Wed Mar 1 2006 Joost van der Sluis <joost@cnoc.nl> 2.0.2-4
- Rebuild for Fedora Extras 5

* 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.