Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 64c43e9e6a67d7c68fe54f6a9b9cb73b > files > 2

fpc-1.0.10-3mdk.src.rpm

%define name fpc
%define version 1.0.10
%define release 3mdk
%define fpcversion %{version}
%define fpcdir %{_libdir}/%{name}/%{fpcversion}
%define docdir %{_datadir}/doc/fpc-%{fpcversion}

%define builddocdir %{buildroot}%{docdir}
%define buildmandir %{buildroot}%{_datadir}
%define buildbindir %{buildroot}%{_bindir}
%define buildlibdir %{buildroot}%{_libdir}
%define buildexampledir %{builddocdir}/examples

Name: 		%{name}
Version: 	%{version}
Release: 	%{release}
ExclusiveArch: 	%{ix86}
License: 	GPL
Group: 		Development/Other
Source: 	http://www.zeus.rug.ac.be/files/dist/Linux/%{name}-%{version}-src.tar.bz2
Summary: 	Free Pascal Compiler
URL: 		http://www.freepascal.org/
BuildRoot: 	%{_tmppath}/%{name}-root
# Sad but true :(
BuildRequires:  fpc
BuildRequires: 	tetex-latex mysql-devel postgresql-devel

%description	
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
Some extensions are added to the language, like function overloading. Shared
libraries can be linked. Basic Delphi support is already implemented (classes,
exceptions,ansistrings,RTTI). This package contains commandline compiler and
utils. Provided units are the runtime library (RTL), free component library
(FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings.

%package docs
Group: 		Development/Other
Summary: 	Free Pascal Compiler - Documentation

%description docs
The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
Some extensions are added to the language, like function overloading. Shared
libraries can be linked. Basic Delphi support is already implemented (classes,
exceptions,ansistrings,RTTI). This package contains commandline compiler and
utils. Provided units are the runtime library (RTL), free component library
(FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings.

This package contains the documentation in PDF format

%prep
%setup -c -q

%build
NEWPP=`pwd`/compiler/ppc386
NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
	make compiler_cycle
	make rtl_clean rtl_smart FPC=${NEWPP}
	make packages_base_smart FPC=${NEWPP}
	make fcl_smart FPC=${NEWPP}
	make packages_extra_smart FPC=${NEWPP}
	make utils_all FPC=${NEWPP}
	make -C docs pdf FPDOC=${NEWFPDOC}

%install
rm -Rf %{buildroot}
#NEWPPUFILES=`pwd`/utils/ppufiles
NEWPP=`pwd`/compiler/ppc386
INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/%{_prefix} INSTALL_LIBDIR=%{buildlibdir} \
                INSTALL_DOCDIR=%{builddocdir} INSTALL_BINDIR=%{buildbindir}"
	make compiler_distinstall ${INSTALLOPTS}
	make rtl_distinstall ${INSTALLOPTS}
	make packages_distinstall ${INSTALLOPTS}
	make fcl_distinstall ${INSTALLOPTS}
	make utils_distinstall ${INSTALLOPTS}

	make demo_install ${INSTALLOPTS} INSTALL_SOURCEDIR=%{buildexampledir}
	make doc_install ${INSTALLOPTS} INSTALL_DOCDIR=%{builddocdir}
	mv %{buildroot}/%{_prefix}/doc/%{name}-%{version}/examples/* %{buildexampledir}
	make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir}

        # create link
	ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386
	
	#make fcl_exampleinstall ${INSTALLOPTS} DOCINSTALLDIR=%{builddocdir}
	#make api_exampleinstall ${INSTALLOPTS} DOCINSTALLDIR=%{builddocdir}
	#make packages_exampleinstall ${INSTALLOPTS} DOCINSTALLDIR=%{builddocdir}


%clean
#	make compiler_clean
#	make rtl_clean
#	make fcl_clean
#	make api_clean
#	make packages_clean
#	make utils_clean

rm -rf $RPM_BUILD_ROOT
	
%post
# Create config
%{fpcdir}/samplecfg %{fpcdir}

%files
%defattr(-,root,root)
%{_bindir}/*
%{fpcdir}
%{_libdir}/fpc
%{_mandir}/*/*
%doc doc/readme.txt doc/whatsnew.txt doc/copying doc/faq.htm doc/faq.txt

%files docs
%defattr(-, root, root)
%doc docs/*.pdf

%changelog
* Thu Feb 26 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.0.10-3mdk
- own %%{_libdir}/fpc
* Tue Nov 25 2003 Götz Waschk <waschk@linux-mandrake.com> 1.0.10-2mdk
- fix man page location

* Sun Aug 31 2003 Buchan Milne <bgmilne@linux-mandrake.com> 1.0.10-1mdk
- Update the oldest package in the distro and sync with official spec

* Tue May 22 2001 Jeff Garzik <jgarzik@mandrakesoft.com> 1.0.4-2mdk
- Use ix86 macro in ExclusiveArch

* Sun Jan 07 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 1.0.4-1mdk
- new and shiny source.

* Sun Nov 19 2000 Daouda Lo <daouda@mandrakesoft.com> 1.0.2-1mdk
- first mandrake release
- add packager tag
- it is very weird that we didn't ship a pascal compiler in the past ;-)
  this language is widely used in universities (for teaching purpose)