openmpi.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. ##
  2. ## openmpi.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package version
  25. %define V_major 1.2
  26. %define V_minor 2
  27. # package information
  28. Name: openmpi
  29. Summary: Message Passing Interface (MPI) Toolkit
  30. URL: http://www.open-mpi.org/
  31. Vendor: IURTC, UTRF, HLRS, UCB, et al.
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: EVAL
  35. Group: RPC
  36. License: BSD-style
  37. Version: %{V_major}
  38. Release: 20070517
  39. # package options
  40. %option with_cxx yes
  41. %option with_fortran yes
  42. # list of sources
  43. Source0: http://www.open-mpi.org/software/ompi/v%{V_major}/downloads/openmpi-%{version}.tar.bz2
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
  48. PreReq: OpenPKG, openpkg >= 20040130
  49. AutoReq: no
  50. AutoReqProv: no
  51. %description
  52. OpenMPI is a project combining technologies and resources from
  53. several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in
  54. order to build the best MPI library available. A completely new
  55. MPI-2 compliant implementation, OpenMPI offers advantages for system
  56. and software vendors, application developers and computer science
  57. researchers.
  58. %track
  59. prog openmpi = {
  60. version = %{version}
  61. url = http://www.open-mpi.org/software/ompi/
  62. regex = openmpi-(\d+\.\d+(\.\d+)*)\.tar\.bz2
  63. }
  64. %prep
  65. %setup -q
  66. %build
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. %if "%{with_cxx}" == "yes"
  70. CXX="%{l_cxx}" \
  71. CXXFLAGS="%{l_cxxflags -O}" \
  72. %endif
  73. CPPFLAGS="%{l_cppflags}" \
  74. LDFLAGS="%{l_ldflags}" \
  75. GREP="grep" \
  76. ./configure \
  77. --prefix=%{l_prefix} \
  78. --sysconfdir=%{l_prefix}/etc/openmpi \
  79. %if "%{with_cxx}" == "yes"
  80. --enable-mpi-cxx \
  81. %else
  82. --disable-mpi-cxx \
  83. %endif
  84. %if "%{with_fortran}" == "yes"
  85. --enable-mpi-f77 \
  86. --enable-mpi-f90
  87. %else
  88. --disable-mpi-f77 \
  89. --disable-mpi-f90
  90. %endif
  91. %{l_make} %{l_mflags -O}
  92. %install
  93. rm -rf $RPM_BUILD_ROOT
  94. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  95. rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.so*
  96. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  97. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  98. %{l_files_std} \
  99. '%config %{l_prefix}/etc/openmpi/*'
  100. %files -f files
  101. %clean
  102. rm -rf $RPM_BUILD_ROOT