2
0

fpc.spec 3.5 KB

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