fpc.spec 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. Name: fpc
  2. Version: 1.1
  3. Release: 0
  4. ExclusiveArch: i386 i586 i686
  5. Copyright: GPL
  6. Group: Development/Languages
  7. Source: %{name}-%{version}-src.tar.gz
  8. Summary: Free Pascal Compiler
  9. Packager: Peter Vreman ([email protected])
  10. URL: http://www.freepascal.org/
  11. BuildRoot: %{_tmppath}/fpc-build
  12. BuildRequires: fpc
  13. %define fpcdir %{_libdir}/fpc/%{version}
  14. %define docdir %{_docdir}/fpc-%{version}
  15. %define builddocdir %{buildroot}%{docdir}
  16. %define buildmandir %{buildroot}%{_mandir}
  17. %define buildbindir %{buildroot}%{_bindir}
  18. %define buildlibdir %{buildroot}%{_libdir}
  19. %description
  20. The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
  21. Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
  22. Some extensions are added to the language, like function overloading. Shared
  23. libraries can be linked. Basic Delphi support is already implemented (classes,
  24. exceptions,ansistrings,RTTI). This package contains commandline compiler and
  25. utils. Provided units are the runtime library (RTL), free component library
  26. (FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings.
  27. %prep
  28. %setup -c
  29. %build
  30. NEWPP=`pwd`/compiler/ppc386
  31. make compiler_cycle
  32. make rtl_clean rtl_smart FPC=${NEWPP}
  33. make packages_base_smart FPC=${NEWPP}
  34. make fcl_smart FPC=${NEWPP}
  35. make packages_extra_smart FPC=${NEWPP}
  36. make utils_all FPC=${NEWPP}
  37. %install
  38. if [ %{buildroot} != "/" ]; then
  39. rm -rf %{buildroot}
  40. fi
  41. NEWPP=`pwd`/compiler/ppc386
  42. INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_LIBDIR=%{buildlibdir} \
  43. INSTALL_DOCDIR=%{builddocdir} INSTALL_BINDIR=%{buildbindir}"
  44. make compiler_distinstall ${INSTALLOPTS}
  45. make rtl_distinstall ${INSTALLOPTS}
  46. make packages_distinstall ${INSTALLOPTS}
  47. make fcl_distinstall ${INSTALLOPTS}
  48. make utils_distinstall ${INSTALLOPTS}
  49. make demo_install ${INSTALLOPTS} INSTALL_SOURCEDIR=%{builddocdir}
  50. make doc_install ${INSTALLOPTS}
  51. make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir}
  52. # create link
  53. ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386
  54. %clean
  55. make compiler_clean
  56. make rtl_clean
  57. make packages_clean
  58. make fcl_clean
  59. make utils_clean
  60. if [ %{buildroot} != "/" ]; then
  61. rm -rf %{buildroot}
  62. fi
  63. %post
  64. # Create config
  65. %{fpcdir}/samplecfg %{fpcdir}
  66. # update ld.so cache
  67. #ldconfig
  68. %files
  69. %defattr(-, root, root)
  70. %{_bindir}/*
  71. %{fpcdir}
  72. %doc %{docdir}/*
  73. %{_mandir}/*/*