openmpi/openmpi.spec

202 lines
6.4 KiB
RPMSpec
Raw Normal View History

Name: openmpi
2006-08-04 22:16:14 +00:00
Version: 1.1
2006-08-27 17:01:44 +00:00
Release: 4%{?dist}
Summary: Open Message Passing Interface
Group: Development/Libraries
License: BSD
URL: http://www.open-mpi.org/
2006-08-04 22:16:14 +00:00
Source0: http://www.open-mpi.org/software/ompi/v1.1/downloads/%{name}-%{version}.tar.bz2
Source1: openmpi.pc.in
Source2: openmpi.module.in
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2006-08-04 22:41:18 +00:00
BuildRequires: gcc-gfortran, autoconf, automake, libtool
#BuildRequires: libibverbs-devel, opensm-devel, libsysfs-devel
Requires(post): /sbin/ldconfig, /usr/sbin/alternatives
2006-08-27 17:17:12 +00:00
ExclusiveArch: i386 x86_64 ia64 ppc ppc64
%package devel
Summary: Development files for openmpi
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description
Open MPI is an open source, freely available implementation of both the
MPI-1 and MPI-2 standards, combining technologies and resources from
several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in
order to build the best MPI library available. A completely new MPI-2
compliant implementation, Open MPI offers advantages for system and
software vendors, application developers, and computer science
researchers. For more information, see http://www.open-mpi.org/ .
%description devel
Contains development headers and libraries for openmpi
%prep
%setup -q
%ifarch x86_64
XCFLAGS="$RPM_OPT_FLAGS -fPIC"
XCXXFLAGS="$RPM_OPT_FLAGS -fPIC"
XFFLAGS="$RPM_OPT_FLAGS -fPIC"
%endif
#%ifarch i386 x86_64 ia64 ppc ppc64 # arches with openib support
#%configure \
# --includedir=%{_includedir}/%{name} \
# --libdir=%{_libdir}/%{name} \
# --datadir=%{_datadir}/%{name}/help \
# --with-openib=/usr \
# LDFLAGS='-Wl,-z,noexecstack' \
# CFLAGS="$CFLAGS $XCFLAGS" \
# CXXFLAGS="$CFLAGS $XCFLAGS" \
# FFLAGS="$FFLAGS $XFLAGS";
#%else # no openib support, but plain tcp/ip still works and is usefull
%configure \
--includedir=%{_includedir}/%{name} \
--libdir=%{_libdir}/%{name} \
--datadir=%{_datadir}/%{name}/help \
LDFLAGS='-Wl,-z,noexecstack' \
CFLAGS="$CFLAGS $XCFLAGS" \
CXXFLAGS="$CFLAGS $XCFLAGS" \
FFLAGS="$FFLAGS $XFLAGS";
#%endif
# ${datadir}/openmpi will be used ONLY for the english help*.txt files
%build
make %{?_smp_mflags}
%install
rm -rf ${RPM_BUILD_ROOT}
make install DESTDIR=${RPM_BUILD_ROOT}
# The three installed man pages are all identical and could be hard links.
# Doesn't really matter though, since we are using alternatives to do
# master and slave linking, remove the man page that goes with the common
# name and link to the uncommon man page via alternatives.
rm ${RPM_BUILD_ROOT}%{_mandir}/man1/mpiexec.1
rm ${RPM_BUILD_ROOT}%{_mandir}/man1/mpirun.1
# Remove the symlinks from common names to the unique name in /usr/bin too
rm ${RPM_BUILD_ROOT}%{_bindir}/mpi*
# Remove the unnecessary compiler common names
rm ${RPM_BUILD_ROOT}%{_bindir}/*{cc,c++,CC}
echo %{_libdir}/%{name} > ${RPM_BUILD_ROOT}%{_libdir}/%{name}/%{name}.ld.conf
# Make the pkgconfig files
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/pkgconfig;
sed 's#@VERSION@#'%{version}'#;s#@LIBDIR@#'%{_libdir}/%{name}'#;s#@INCLUDEDIR@#'%{_includedir}/%{name}'#' < %SOURCE1 > ${RPM_BUILD_ROOT}/%{_libdir}/pkgconfig/%{name}.pc;
sed 's#@DATADIR@#'%{_datadir}/%{name}'#;s#@NAME@#'%{name}'#' < %SOURCE2 > ${RPM_BUILD_ROOT}/%{_datadir}/%{name}/%{name}.module
%clean
[ ! -z "${RPM_BUILD_ROOT}" ] && rm -rf ${RPM_BUILD_ROOT}
%post
2006-08-27 17:01:44 +00:00
if [ "$1" -eq 1 ]; then
alternatives --install %{_sysconfdir}/ld.so.conf.d/mpi.conf mpi \
%{_libdir}/openmpi/openmpi.ld.conf 10 \
--slave %{_bindir}/mpirun mpi-run %{_bindir}/orterun \
--slave %{_bindir}/mpiexec mpi-exec %{_bindir}/orterun \
--slave %{_mandir}/man1/mpirun.1.gz mpi-run-man \
%{_mandir}/man1/orterun.1.gz \
--slave %{_mandir}/man1/mpiexec.1.gz mpi-exec-man \
%{_mandir}/man1/orterun.1.gz
fi;
/sbin/ldconfig
%preun
2006-08-27 17:01:44 +00:00
if [ "$1" -eq 0 ]; then
alternatives --remove mpi %{_libdir}/openmpi/openmpi.ld.conf
fi
%postun -p /sbin/ldconfig
%post devel
2006-08-27 17:01:44 +00:00
if [ "$1" -eq 1 ]; then
alternatives --install %{_bindir}/mpicc mpicc \
%{_bindir}/opal_wrapper 10 \
--slave %{_bindir}/mpic++ mpic++ %{_bindir}/opal_wrapper \
--slave %{_bindir}/mpiCC mpiCC %{_bindir}/opal_wrapper \
--slave %{_bindir}/mpicxx mpicxx %{_bindir}/opal_wrapper \
--slave %{_bindir}/mpif77 mpif77 %{_bindir}/opal_wrapper \
--slave %{_bindir}/mpif90 mpif90 %{_bindir}/opal_wrapper
fi
%preun devel
2006-08-27 17:01:44 +00:00
if [ "$1" -eq 0 ]; then
alternatives --remove mpicc %{_bindir}/opal_wrapper
fi
2006-08-27 17:01:44 +00:00
%postun devel -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc LICENSE README
2006-08-07 20:43:43 +00:00
%config(noreplace) %{_sysconfdir}/openmpi-*
%{_bindir}/orteconsole
%{_bindir}/orted
%{_bindir}/orteprobe
%{_bindir}/orterun
%{_bindir}/ompi_info
%{_bindir}/openmpi
%dir %{_libdir}/%{name}
%dir %{_libdir}/%{name}/%{name}
%{_libdir}/%{name}/*.so.*
%{_libdir}/%{name}/%{name}/*.so
%{_libdir}/%{name}/*.conf
%{_mandir}/man1/*
%{_datadir}/%{name}
%files devel
%defattr(-,root,root,-)
%{_bindir}/opal_wrapper
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*
%{_libdir}/%{name}/*.so
2006-08-08 00:46:46 +00:00
%{_libdir}/%{name}/*.a
%{_libdir}/%{name}/*.la
%{_libdir}/%{name}/%{name}/*.la
%{_libdir}/pkgconfig/%{name}.pc
2006-08-27 17:01:44 +00:00
%{_libdir}/%{name}/*.mod
%changelog
2006-08-27 17:01:44 +00:00
* Sun Aug 27 2006 Doug Ledford <dledford@redhat.com> - 1.1-4
- Make sure the post/preun scripts only add/remove alternatives on initial
install and final removal, otherwise don't touch.
* Fri Aug 25 2006 Doug Ledford <dledford@redhat.com> - 1.1-3
- Don't ghost the mpi.conf file as that means it will get removed when
you remove 1 out of a number of alternatives based packages
- Put the .mod file in -devel
* Mon Aug 7 2006 Doug Ledford <dledford@redhat.com> - 1.1-2
- Various lint cleanups
- Switch to using the standard alternatives mechanism instead of a home
grown one
2006-08-04 22:16:14 +00:00
* Wed Aug 2 2006 Doug Ledford <dledford@redhat.com> - 1.1-1
- Upgrade to 1.1
- Build with Infiniband support via openib
2006-06-12 20:18:02 +00:00
* Mon Jun 12 2006 Jason Vas Dias <jvdias@redhat.com> - 1.0.2-1
- Upgrade to 1.0.2
* Wed Feb 15 2006 Jason Vas Dias <jvdias@redhat.com> - 1.0.1-1
- Import into Fedora Core
- Resolve LAM clashes
* Wed Jan 25 2006 Orion Poplawski <orion@cora.nwra.com> - 1.0.1-2
- Use configure options to install includes and libraries
- Add ld.so.conf.d file to find libraries
- Add -fPIC for x86_64
* Tue Jan 24 2006 Orion Poplawski <orion@cora.nwra.com> - 1.0.1-1
- 1.0.1
- Use alternatives
* Sat Nov 19 2005 Ed Hill <ed@eh3.com> - 1.0-2
- fix lam conflicts
* Fri Nov 18 2005 Ed Hill <ed@eh3.com> - 1.0-1
- initial specfile created