openmpi.spec 3.5 KB

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