fpc.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. Name: fpc
  2. Version: 1.9.2
  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 exampledir %{docdir}/examples
  16. %define builddocdir %{buildroot}%{docdir}
  17. %define buildmandir %{buildroot}%{_mandir}
  18. %define buildbindir %{buildroot}%{_bindir}
  19. %define buildlibdir %{buildroot}%{_libdir}
  20. %define buildexampledir %{buildroot}%{exampledir}
  21. # The normal redhat rpm scripts does not recognize properly, what files to strip
  22. # Hook our own strip command
  23. %define __strip %{buildroot}/smart_strip.sh
  24. %description
  25. The Free Pascal Compiler is a Turbo Pascal 7.0 and Delphi compatible 32bit
  26. Pascal Compiler. It comes with fully TP 7.0 compatible run-time library.
  27. Some extensions are added to the language, like function overloading. Shared
  28. libraries can be linked. Basic Delphi support is already implemented (classes,
  29. exceptions,ansistrings,RTTI). This package contains commandline compiler and
  30. utils. Provided units are the runtime library (RTL), free component library
  31. (FCL), gtk,ncurses,zlib, mysql,postgres,ibase bindings.
  32. ###############################################################################
  33. # fpc.rpm
  34. #
  35. %prep
  36. %setup -c
  37. %build
  38. NEWPP=`pwd`/compiler/ppc386
  39. NEWFPDOC=`pwd`/utils/fpdoc/fpdoc
  40. make compiler_cycle
  41. make rtl_clean rtl_smart FPC=${NEWPP}
  42. make packages_base_smart FPC=${NEWPP}
  43. make fcl_smart FPC=${NEWPP}
  44. make packages_extra_smart FPC=${NEWPP}
  45. make utils_all FPC=${NEWPP}
  46. if [ -z ${NODOCS} ]; then
  47. make -C docs pdf FPDOC=${NEWFPDOC}
  48. fi
  49. %install
  50. if [ %{buildroot} != "/" ]; then
  51. rm -rf %{buildroot}
  52. fi
  53. NEWPP=`pwd`/compiler/ppc386
  54. INSTALLOPTS="FPC=${NEWPP} INSTALL_PREFIX=%{buildroot}/usr INSTALL_LIBDIR=%{buildlibdir} \
  55. INSTALL_DOCDIR=%{builddocdir} INSTALL_BINDIR=%{buildbindir} \
  56. INSTALL_EXAMPLEDIR=%{buildexampledir}"
  57. make compiler_distinstall ${INSTALLOPTS}
  58. make rtl_distinstall ${INSTALLOPTS}
  59. make packages_distinstall ${INSTALLOPTS}
  60. make fcl_distinstall ${INSTALLOPTS}
  61. make utils_distinstall ${INSTALLOPTS}
  62. make demo_install ${INSTALLOPTS} INSTALL_SOURCEDIR=%{buildexampledir}
  63. make doc_install ${INSTALLOPTS}
  64. make man_install ${INSTALLOPTS} INSTALL_PREFIX=%{buildmandir}
  65. if [ -z ${NODOCS} ]; then
  66. make -C docs pdfinstall DOCINSTALLDIR=%{builddocdir}
  67. fi
  68. # create link
  69. ln -sf %{fpcdir}/ppc386 %{buildroot}%{_bindir}/ppc386
  70. # Workaround:
  71. # newer rpm versions do not allow garbage
  72. # delete lexyacc
  73. rm -rf %{buildroot}/usr/lib/fpc/lexyacc
  74. %clean
  75. make compiler_clean
  76. make rtl_clean
  77. make packages_clean
  78. make fcl_clean
  79. make utils_clean
  80. if [ -z ${NODOCS} ]; then
  81. make -C docs clean
  82. fi
  83. if [ %{buildroot} != "/" ]; then
  84. rm -rf %{buildroot}
  85. fi
  86. %post
  87. # Create a version independent config
  88. %{fpcdir}/samplecfg %{_libdir}/fpc/\$version
  89. %files
  90. %defattr(-, root, root)
  91. %{_bindir}/*
  92. %{fpcdir}
  93. %doc %{docdir}/NEWS
  94. %doc %{docdir}/README
  95. %doc %{docdir}/faq*
  96. %doc %{exampledir}/*
  97. %{_mandir}/*/*