indy-fpc.spec.template 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. %define _IndyBaseName indy
  2. %define _FPC_Version 2.1.1
  3. %define _FPC_RPM_Ver 2.1.1
  4. %define _FPC_SRC_RPM_Ver 2.1.1
  5. %define _FPCLibPrefix %{_libdir}/fpc/%{_FPC_Version}
  6. %define _FPCUnitDir %{_FPCLibPrefix}/units
  7. %define _FPCUnitArcDir %{_FPCUnitDir}/%{_arch}-%{_os}
  8. %define _IndyLibPrefix %{_FPCLibPrefix}/units/%{_arch}-%{_os}/%{_IndyBaseName}
  9. %define _IndyDocsDir %{_defaultdocdir}/fpc-%{_FPC_Version}/%{_IndyBaseName}
  10. %define _IndyExamplesDir %{_IndyDocsDir}/examples
  11. %define _IndyFPCSRCDir %{_usr}/share/fpcsrc/packages/extra/%{_IndyBaseName}
  12. %define _Build_LibDir %{buildroot}%{_libdir}
  13. %define _Build_LibDebugDir %{_Build_LibDir}/debug
  14. %define _Build_BinDir %{buildroot}%{_bindir}
  15. %define _Build_FPCLibPrefix %{buildroot}%{_FPCLibPrefix}
  16. %define _Build_IndyLibPrefix %{buildroot}%{_IndyLibPrefix}
  17. %define _Build_IndyDocsDir %{buildroot}%{_IndyDocsDir}
  18. %define _Build_IndyExamplesDir %{buildroot}%{_IndyExamplesDir}
  19. %define _Build_IndyFPCSRCDir %{buildroot}%{_IndyFPCSRCDir}
  20. Summary: Indy.Sockets (FreePascal Version)
  21. Name: %{_IndyBaseName}-fpc
  22. Version: _
  23. Release: _
  24. #the Indy name is hardcoded because we will probably have other package sets in that file.
  25. Source0: http://www.indyproject.org/sockets/fpc/indy-%{version}.tar.bz2
  26. BuildRequires: fpc = %{_FPC_RPM_Ver}
  27. Requires: fpc = %{_FPC_RPM_Ver}
  28. License: BSD style or MPL
  29. BuildRoot: %{_tmppath}/%{name}-%{version}
  30. Group: Development/Libraries
  31. URL: http://www.indyproject.org
  32. %description
  33. Indy.Sockets is an open source socket library that supports clients, servers,
  34. TCP, UDP, raw sockets, as well as over 100 higher level protocols such as
  35. SMTP, POP3, NNTP, HTTP, and many more. Indy.Sockets is available for C#, C++,
  36. Delphi, Visual Basic.NET, any .NET language, and Kylix. This version is for
  37. FreePascal.
  38. %package src
  39. Summary: Indy.Sockets (FreePascal Version) - sources
  40. Group: Development/Libraries
  41. Requires: fpc-src = %{_FPC_SRC_RPM_Ver}
  42. %description src
  43. The indy-src package contains the sources of Indy, for documentation or
  44. automatically-code generation purposes.
  45. # disable the debuginfo package
  46. %define debug_package %{nil}
  47. %define __spec_install_post /usr/lib/rpm/brp-compress
  48. %prep
  49. %setup -q -c
  50. %build
  51. # The source-files:
  52. mkdir fpcsrc
  53. pwd
  54. cd fpc
  55. cp -a *.pas ../fpcsrc
  56. cp -a *.inc ../fpcsrc
  57. cp -a *.obj ../fpcsrc
  58. cp -a Makefile* ../fpcsrc
  59. cp -a examples ../fpcsrc
  60. #the binaries
  61. make all
  62. %install
  63. #rm -rf %{buildroot}
  64. #cd %{_IndyBaseName}-%{version}
  65. # The source-files:
  66. cd fpcsrc
  67. mkdir -p %{_Build_IndyFPCSRCDir}
  68. cp -r ./* %{_Build_IndyFPCSRCDir}
  69. #binaries
  70. cd ../fpc
  71. mkdir -p %{_Build_BinDir}
  72. mkdir -p %{_Build_LibDir}
  73. mkdir -p %{_Build_LibDebugDir}
  74. mkdir -p %{_Build_FPCLibPrefix}
  75. mkdir -p %{_Build_IndyLibPrefix}
  76. mkdir -p %{_Build_IndyDocsDir}
  77. mkdir -p %{_Build_IndyExamplesDir}
  78. install -D -m 644 ../README %{_Build_IndyDocsDir}/README
  79. install -D -m 644 ../COPYING %{_Build_IndyDocsDir}/COPYING
  80. install -D -m 644 ../COPYING.modifiedBSD \
  81. %{_Build_IndyDocsDir}/COPYING.modifiedBSD
  82. install -D -m 644 ../COPYING.MPL %{_Build_IndyDocsDir}/COPYING.MPL
  83. INSTALLOPTS="INSTALL_PREFIX=%{_Build_FPCLibPrefix} \
  84. NSTALL_LIBDIR=%{_Build_LibDir} \
  85. INSTALL_BASEDIR=%{_Build_FPCLibPrefix} \
  86. INSTALL_DOCDIR=%{_Build_IndyDocsDir} \
  87. INSTALL_BINDIR=%{_Build_BinDir} \
  88. INSTALL_EXAMPLEDIR=%{_Build_IndyExamplesDir}"
  89. SETFPCDIR=0
  90. #Note that you have to use the FPCDIR environment variable
  91. #for fpcmake -p T[target] so that it doesn't fail saying
  92. #rtl not found.
  93. if [ -z "$FPCDIR" ]; then
  94. FPCDIR=/usr/lib/fpc/${_FPC_Version}
  95. if [ ! -d "$FPCDIR" ]; then
  96. FPCDIR=/usr/local/lib/fpc/${_FPC_Version}
  97. fi
  98. export FPCDIR
  99. SETFPCDIR=1
  100. fi
  101. make distinstall ${INSTALLOPTS}
  102. if [ $SETFPCDIR = '1' ]; then
  103. FPCDIR=
  104. export FPCDIR
  105. fi
  106. %clean
  107. rm -rf %{buildroot}
  108. %files
  109. %defattr(-,root,root)
  110. %{_libdir}/*
  111. %doc %{_IndyDocsDir}/README
  112. %doc %{_IndyDocsDir}/COPYING
  113. %doc %{_IndyDocsDir}/COPYING.modifiedBSD
  114. %doc %{_IndyDocsDir}/COPYING.MPL
  115. %doc %{_IndyExamplesDir}/*
  116. %files src
  117. %defattr(-,root,root,-)
  118. %{_datadir}/fpcsrc/*
  119. %changelog
  120. * Sun Jun 4 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-8
  121. - adjusted for indy source-code files being in dir in distribution
  122. - removed hard-coded version numbers and release numbers. They only need to be updated in
  123. akeindyrpm.sh script
  124. * Fri May 26 2006 J. Peter Mugaas <[email protected]>
  125. - indy-fpcsrc files now placed in a single dir so it works with Lazarus CodeTools.
  126. * Thu Apr 3 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-7
  127. - spec file clean-ups
  128. * Mon Apr 3 2006 J. Peter Mugaas <[email protected]>
  129. - changed the .gz file to a bz2 form to be consistant with other RPM's in many distributions.
  130. - added first example program.
  131. * Thu Mar 30 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-6
  132. - moved fpcsrc files to /usr/share/fpsrc from /usr/share/docs/fpcsrc
  133. - fpcsrc RPM now includes all of the Makefiles.
  134. * Wed Mar 29 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-5
  135. - fixed inconsistancies between Makefile.fpc and the file placement in the RPM's.
  136. - files should now be placed in the indy directories instead of indy-fpc.
  137. * Tue Mar 28 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-4
  138. - Many spec fixes.
  139. - Now temporarily sets the FPCDIR before Make install to prevent rtl not found errors.
  140. * Wed Mar 22 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-3
  141. - made a -src package for consistency with Lazarus FPC packages.
  142. - renamed rpm set to "indy-fpc" so we make separate RPM sets for Lazarus design-time code and
  143. maybe other packages than marked RPM "indy" as obsolete.
  144. - Removed hack for obtaining the FPC version. It was not always working as expected.
  145. - Made requirement for a specific FreePascal compiler version to prevent
  146. any problems with unit version mismatches.
  147. - moved doc files from /usr/share/doc/indy-[ver] to /usr/share/doc/fpc-[fpcver]/indy to
  148. be consistent with other packages.
  149. * Mon Mar 15 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-2
  150. - now uses a URL for source
  151. - tarrball names now include a "version" number
  152. - changelog to keep rpmlint happy
  153. - spec file clean ups.
  154. * Wed Mar 8 2006 J. Peter Mugaas <[email protected]> 10.2.0.1-1 cd ../fpc
  155. - initial spec file