Bring the latest work from the v1.0 branch (easier to keep / maintain
up here on the trunk -- nothing has changes w.r.t the RPM packaging yet). Used svn cp to bring in README and buildrpm.sh, but since openmpi.spec already existed here, I couldn't svn cp because it complained about one being in the way. I *could* svn merge it here to preserve all the history, but I'm not really interested in the history -- I just want to replace it en masse with the stuff from the 1.0 branch because that's the latest latest latest. This commit was SVN r9720.
Этот коммит содержится в:
родитель
6fd19ef890
Коммит
7871b207e1
108
contrib/dist/linux/README
поставляемый
Обычный файл
108
contrib/dist/linux/README
поставляемый
Обычный файл
@ -0,0 +1,108 @@
|
||||
Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
University Research and Technology
|
||||
Corporation. All rights reserved.
|
||||
Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
of Tennessee Research Foundation. All rights
|
||||
reserved.
|
||||
Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
|
||||
University of Stuttgart. All rights reserved.
|
||||
Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
|
||||
$HEADER$
|
||||
|
||||
===========================================================================
|
||||
|
||||
The buildrpm.sh script takes a single argument -- a filename pointing
|
||||
to an Open MPI tarball (may be either .gz or .bz2). It will create
|
||||
one or more RPMs from this tarball:
|
||||
|
||||
1. Source RPM
|
||||
2. "All in one" RPM, where all of Open MPI is put into a single RPM.
|
||||
3. "Multiple" RPM, where Open MPI is split into several sub-package
|
||||
RPMs:
|
||||
- openmpi-runtime
|
||||
- openmpi-devel
|
||||
- openmpi-docs (not currently generated because we have no docs; to
|
||||
be rectified soon!)
|
||||
|
||||
The prefix, target architecture, and choice of RPM(s) to build are all
|
||||
currently hard-coded in the beginning of the buildrpm.sh script.
|
||||
|
||||
Alternatively, you can build directly from the openmpi.spec spec file
|
||||
or SRPM directly. The following options are permissable on the
|
||||
"rpmbuild" command line via the --define option:
|
||||
|
||||
- lanl: 0 or 1 (default: 0)
|
||||
A shortcut for several Los Alamos-specific options (see specfile for
|
||||
current list of values -- look for "%if %{lanl}").
|
||||
|
||||
- install_in_opt: 0 or 1 (default: 0)
|
||||
If 1, use a prefix of /opt/openmpi/<version>-<release>.
|
||||
|
||||
- install_env_scripts: 0 or 1 (default: 0)
|
||||
If 1, install the modulefile or profile.d scripts.
|
||||
|
||||
- install_modulefile: 0 or 1 (default: 0)
|
||||
If 1 and if install_in_opt is 1, then install a modulefile in
|
||||
%{modulefile_path}/%{modulefile_subdir}/%{modulefile_name}
|
||||
|
||||
- modulefile_path: string (default: "/etc/modulefiles")
|
||||
Defaults to /etc/modulefiles
|
||||
|
||||
- modulefile_subdir: string (default: "openmpi")
|
||||
Defaults to openmpi
|
||||
|
||||
- modulefile_name: string (default: "%{version}-${release}")
|
||||
Defaults to %{version}-%{release}
|
||||
|
||||
- modules_rpm_name: string ("modules")
|
||||
Name of the environment modules RPM to "require".
|
||||
|
||||
- build_debuginfo_rpm: 0 or 1 (default: 0)
|
||||
If 1, builds a corresponding debuginfo rpm.
|
||||
|
||||
- _prefix (etc.): string (default: supplied by rpmbuild)
|
||||
Prefix directory (all other standard names are also supported, such
|
||||
as _libdir, _sysconfdir, _includedir, etc.).
|
||||
|
||||
- configure_options: string (default: "")
|
||||
String to pass directly to the ./configure script.
|
||||
|
||||
- _packager: string (default: supplied by rpmbuild)
|
||||
Name of the packager
|
||||
|
||||
- _vendor: string (default: supplied by rpmbuild)
|
||||
Name of the vendor
|
||||
|
||||
- cflags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
|
||||
CFLAGS value to use
|
||||
|
||||
- cxxflags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
|
||||
CXXFLAGS value to use
|
||||
|
||||
- f77flags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
|
||||
F77FLAGS value to use
|
||||
|
||||
- fcflags: string (default: supplied by rpmbuild: $RPM_OPT_FLAGS)
|
||||
F90FLAGS value to use
|
||||
|
||||
- mflags: string (default: "")
|
||||
Flags to pass to the "make" [default] target during %build
|
||||
|
||||
- mflags_install: string (default: "")
|
||||
Flags to pass to the "make install" target during %install
|
||||
|
||||
- build_all_in_one_rpm: 0 or 1 (default: 1)
|
||||
If 1 (the default), make a single RPM that contains all of the Open
|
||||
MPI software. If 0, build multiple sub-package RPMs to split up the
|
||||
Open MPI code into separate functional areas. See the spec file for
|
||||
the exact division and subpackage definitions.
|
||||
|
||||
- name: string (default "openmpi")
|
||||
If set, used as the name of the RPM (useful if you want to add a
|
||||
compiler name -- or some other qualifier -- to the RPM name).
|
256
contrib/dist/linux/buildrpm.sh
поставляемый
Исполняемый файл
256
contrib/dist/linux/buildrpm.sh
поставляемый
Исполняемый файл
@ -0,0 +1,256 @@
|
||||
#!/bin/sh -f
|
||||
#
|
||||
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
#
|
||||
|
||||
#
|
||||
# General config vars
|
||||
#
|
||||
|
||||
prefix="/opt/openmpi"
|
||||
specfile="openmpi.spec"
|
||||
rpmbuild_options="--define 'mflags -j4'"
|
||||
# Another option: --target=i686-pc-gnu
|
||||
|
||||
# Some distro's will attempt to force using bizarre, custom compiler
|
||||
# names (e.g., i386-redhat-linux-gnu-gcc). So hardwire them to use
|
||||
# "normal" names.
|
||||
#export CC=gcc
|
||||
#export CXX=g++
|
||||
#export F77=f77
|
||||
#export FC=
|
||||
|
||||
# Note that this script can build one or all of the following RPMs:
|
||||
# SRPM, all-in-one, multiple.
|
||||
|
||||
# If you want to build the SRPM, put "yes" here
|
||||
build_srpm=yes
|
||||
# If you want to build the "all in one RPM", put "yes" here
|
||||
build_single=no
|
||||
# If you want to build the "multiple" RPMs, put "yes" here
|
||||
build_multiple=yes
|
||||
|
||||
#########################################################################
|
||||
# You should not need to change anything below this line
|
||||
#########################################################################
|
||||
|
||||
#
|
||||
# get the tarball name
|
||||
#
|
||||
|
||||
tarball="$1"
|
||||
if test "$tarball" = ""; then
|
||||
echo "Usage: buildrpm.sh <tarball>"
|
||||
exit 1
|
||||
fi
|
||||
if test ! -f $tarball; then
|
||||
echo "Can't find $tarball"
|
||||
exit 1
|
||||
fi
|
||||
echo "--> Found tarball: $tarball"
|
||||
|
||||
#
|
||||
# get the extension from the tarball (gz or bz2)
|
||||
#
|
||||
|
||||
extension=`echo $tarball | egrep '\.bz2'`
|
||||
if test -n "$extension"; then
|
||||
extension=bz2
|
||||
else
|
||||
extension=gz
|
||||
fi
|
||||
|
||||
#
|
||||
# Get the version number
|
||||
#
|
||||
|
||||
first="`basename $tarball | cut -d- -f2`"
|
||||
version="`echo $first | sed -e 's/\.tar\.'$extension'//'`"
|
||||
unset first
|
||||
echo "--> Found Open MPI version: $version"
|
||||
|
||||
#
|
||||
# do we have the spec files?
|
||||
#
|
||||
|
||||
if test ! -f $specfile; then
|
||||
echo "can't find $specfile"
|
||||
exit 1
|
||||
fi
|
||||
echo "--> Found specfile: $specfile"
|
||||
|
||||
#
|
||||
# Find where the top RPM-building directory is
|
||||
#
|
||||
|
||||
rpmtopdir="`grep %_topdir $HOME/.rpmmacros | awk '{ print $2 }'`"
|
||||
if test "$rpmtopdir" != ""; then
|
||||
if test ! -d "$rpmtopdir"; then
|
||||
mkdir -p "$rpmtopdir"
|
||||
mkdir -p "$rpmtopdir/BUILD"
|
||||
mkdir -p "$rpmtopdir/RPMS"
|
||||
mkdir -p "$rpmtopdir/RPMS/i386"
|
||||
mkdir -p "$rpmtopdir/RPMS/i586"
|
||||
mkdir -p "$rpmtopdir/RPMS/i686"
|
||||
mkdir -p "$rpmtopdir/RPMS/noarch"
|
||||
mkdir -p "$rpmtopdir/RPMS/athlon"
|
||||
mkdir -p "$rpmtopdir/SOURCES"
|
||||
mkdir -p "$rpmtopdir/SPECS"
|
||||
mkdir -p "$rpmtopdir/SRPMS"
|
||||
fi
|
||||
need_root=0
|
||||
elif test -d /usr/src/RPM; then
|
||||
need_root=1
|
||||
rpmtopdir="/usr/src/RPM"
|
||||
else
|
||||
need_root=1
|
||||
rpmtopdir="/usr/src/redhat"
|
||||
fi
|
||||
echo "--> Found RPM top dir: $rpmtopdir"
|
||||
|
||||
#
|
||||
# If we're not root, try to sudo
|
||||
#
|
||||
|
||||
if test "$need_root" = "1" -a "`whoami`" != "root"; then
|
||||
echo "--> Trying to sudo: \"$0 $*\""
|
||||
echo "------------------------------------------------------------"
|
||||
sudo -u root sh -c "$0 $tarball"
|
||||
echo "------------------------------------------------------------"
|
||||
echo "--> sudo finished"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#
|
||||
# make sure we have write access to the directories we need
|
||||
#
|
||||
|
||||
if test ! -w $rpmtopdir/SOURCES ; then
|
||||
echo "Problem creating rpms: You do not have a $rpmtopdir directory"
|
||||
echo "tree or you do not have write access to the $rpmtopdir directory"
|
||||
echo "tree. Please remedy and try again."
|
||||
exit 1
|
||||
fi
|
||||
echo "--> Have write access to $rpmtopdir/SOURCES"
|
||||
|
||||
#
|
||||
# move the tarball file to the rpm directory
|
||||
#
|
||||
|
||||
cp $tarball $rpmtopdir/SOURCES
|
||||
|
||||
#
|
||||
# Print out the compilers
|
||||
#
|
||||
|
||||
cat <<EOF
|
||||
--> Hard-wired for compilers:
|
||||
CC = $CC
|
||||
CXX = $CXX
|
||||
F77 = $F77
|
||||
FC = $FC
|
||||
EOF
|
||||
|
||||
#
|
||||
# what command should we use?
|
||||
# RH 8.0 changed from using "rpm -ba" to "rpmbuild -ba". ARRGGH!!!
|
||||
#
|
||||
|
||||
which rpmbuild 2>&1 >/dev/null
|
||||
if test "$?" = "0"; then
|
||||
rpm_cmd="rpmbuild"
|
||||
else
|
||||
rpm_cmd="rpm"
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# from the specfile
|
||||
#
|
||||
|
||||
specdest="$rpmtopdir/SPECS/openmpi-$version.spec"
|
||||
sed -e 's/\$VERSION/'$version'/g' \
|
||||
-e 's/\$EXTENSION/'$extension'/g' \
|
||||
$specfile > "$specdest"
|
||||
echo "--> Created destination specfile: $specdest"
|
||||
release=`egrep -i release: $specdest | cut -d\ -f2`
|
||||
|
||||
#
|
||||
# Setup compiler string
|
||||
#
|
||||
|
||||
configure_options="CC=$CC CXX=$CXX FC=$FC F77=$F77"
|
||||
|
||||
#
|
||||
# Make the SRPM
|
||||
#
|
||||
|
||||
if test "$build_srpm" = "yes"; then
|
||||
echo "--> Building the Open MPI SRPM"
|
||||
cmd="$rpm_cmd -bs $specdest"
|
||||
echo "--> $cmd"
|
||||
eval $cmd
|
||||
|
||||
if test $? != 0; then
|
||||
echo "*** FAILURE BUILDING SRPM!"
|
||||
echo "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
echo "--> Done building the SRPM"
|
||||
fi
|
||||
|
||||
#
|
||||
# Make the single RPM
|
||||
#
|
||||
|
||||
if test "$build_single" = "yes"; then
|
||||
echo "--> Building the single Open MPI RPM"
|
||||
cmd="$rpm_cmd -bb $rpmbuild_options --define 'build_all_in_one_rpm 1' --define 'configure_options $configure_options' $specdest"
|
||||
echo "--> $cmd"
|
||||
eval $cmd
|
||||
|
||||
if test $? != 0; then
|
||||
echo "*** FAILURE BUILDING SINGLE RPM!"
|
||||
echo "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
echo "--> Done building the single RPM"
|
||||
fi
|
||||
|
||||
#
|
||||
# Make the multi RPM
|
||||
#
|
||||
|
||||
if test "$build_multiple" = "yes"; then
|
||||
echo "--> Building the multiple Open MPI RPM"
|
||||
cmd="$rpm_cmd -bb $rpmbuild_options --define 'build_all_in_one_rpm 0' --define 'configure_options $configure_options' $specdest"
|
||||
echo "--> $cmd"
|
||||
eval $cmd
|
||||
|
||||
if test $? != 0; then
|
||||
echo "*** FAILURE BUILDING MULTIPLE RPM!"
|
||||
echo "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
echo "--> Done building the multiple RPM"
|
||||
fi
|
||||
|
||||
#
|
||||
# Done
|
||||
#
|
||||
|
||||
cat <<EOF
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
==== FINISHED BUILDING Open MPI RPM ====
|
||||
------------------------------------------------------------------------------
|
||||
A copy of the tarball is located in: $rpmtopdir/SOURCES/
|
||||
The completed rpms are located in: $rpmtopdir/RPMS/i<something>86/
|
||||
The sources rpms are located in: $rpmtopdir/SRPMS/
|
||||
The spec files are located in: $rpmtopdir/SPECS/
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
EOF
|
189
contrib/dist/linux/openmpi.spec
поставляемый
189
contrib/dist/linux/openmpi.spec
поставляемый
@ -9,6 +9,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -36,35 +37,42 @@
|
||||
# Part of the purpose of this specfile is to help Los Alamos National
|
||||
# Labs (LANL), so we're going to put in a bunch of defaults for them.
|
||||
|
||||
%define lanl 0
|
||||
%{!?lanl: %define lanl 0}
|
||||
|
||||
# Define this if you want to make this SRPM build in /opt/NAME/VERSION-RELEASE
|
||||
# instead of the default /usr/
|
||||
# type: bool (0/1)
|
||||
%define install_in_opt 0
|
||||
%{!?install_in_opt: %define install_in_opt 0}
|
||||
|
||||
# Define this if you want this RPM to install environment setup
|
||||
# scripts, currently either a modulefile or profile.d script.
|
||||
# type: bool (0/1)
|
||||
%define install_env_scripts 0
|
||||
%{!?install_env_scripts: %define install_env_scripts 0}
|
||||
|
||||
# Should this drop a modulefile (if being used with enviornment modules)?
|
||||
# Specify the modulefile PATH you wish to use, or '0' for null (which will
|
||||
# cause /etc/profile.d/ scripts to be created.
|
||||
# note: This will only work if %{install_in_opt} is true.
|
||||
# type: bool (0/1)
|
||||
%define install_modulefile 0
|
||||
%{!?install_modulefile: %define install_modulefile 0}
|
||||
# type: string (root path to install modulefiles)
|
||||
%define modulefile_path /etc/modulefiles
|
||||
%{!?modulefile_path: %define modulefile_path /etc/modulefiles}
|
||||
# type: string (subdir to install modulefile)
|
||||
%define modulefile_subdir %{name}
|
||||
%{!?modulefile_subdir: %define modulefile_subdir %{name}}
|
||||
# type: string (name of modulefile)
|
||||
%define modulefile_name %{version}-%{release}
|
||||
%{!?modulefile_name: %define modulefile_name %{version}-%{release}}
|
||||
|
||||
# The name of the modules RPM. Can vary from system to system.
|
||||
# type: string (name of modules RPM)
|
||||
%define modules_rpm_name modules
|
||||
%{!?modules_rpm_name: %define modules_rpm_name modules}
|
||||
|
||||
# Should we build a debuginfo RPM or not?
|
||||
# type: bool (0/1)
|
||||
%{!?build_debuginfo_rpm: %define build_debuginfo_rpm 0}
|
||||
|
||||
# Should we build an all-in-one RPM, or several sub-package RPMs?
|
||||
# type: bool (0/1)
|
||||
%{!?build_all_in_one_rpm: %define build_all_in_one_rpm 1}
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
@ -96,6 +104,18 @@
|
||||
%define _includedir /opt/%{name}/%{version}-%{release}/include
|
||||
%endif
|
||||
|
||||
%if !%{build_debuginfo_rpm}
|
||||
%define debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%if %(test "%{_prefix}" = "/usr" && echo 1 || echo 0)
|
||||
%global _sysconfdir /etc
|
||||
%else
|
||||
%global _sysconfdir %{_prefix}/etc
|
||||
%endif
|
||||
|
||||
%{!?configure_options: %define configure_options %{nil}}
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Preamble Section
|
||||
@ -103,18 +123,19 @@
|
||||
#############################################################################
|
||||
|
||||
Summary: A powerful implementaion of MPI
|
||||
Name: openmpi
|
||||
Name: %{?_name:%{_name}}%{!?_name:openmpi}
|
||||
Version: $VERSION
|
||||
Release: 1
|
||||
License: BSD
|
||||
Group: Development/Libraries
|
||||
Source: openmpi-%{version}.tar.bz2
|
||||
Source: openmpi-%{version}.tar.$EXTENSION
|
||||
Packager: %{?_packager:%{_packager}}%{!?_packager:%{_vendor}}
|
||||
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
|
||||
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
|
||||
Prefix: %{_prefix}
|
||||
Provides: mpi
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
|
||||
%if %{module_modulefile}
|
||||
%if %{install_modulefile}
|
||||
Requires: %{modules_rpm_name}
|
||||
%endif
|
||||
|
||||
@ -123,6 +144,33 @@ Open MPI is a project 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.
|
||||
|
||||
This RPM contains all the tools necessary to compile, link, and run
|
||||
Open MPI jobs.
|
||||
|
||||
%if !%{build_all_in_one_rpm}
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Preamble Section (runtime)
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
%package runtime
|
||||
Summary: Tools and plugin modules for running Open MPI jobs
|
||||
Group: Development/Libraries
|
||||
Provides: mpi
|
||||
|
||||
%description runtime
|
||||
Open MPI is a project 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.
|
||||
|
||||
This subpackage provides general tools (mpirun, mpiexec, etc.) and the
|
||||
Module Component Architecture (MCA) base and plugins necessary for
|
||||
running Open MPI jobs.
|
||||
|
||||
%endif
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Preamble Section (devel)
|
||||
@ -130,9 +178,9 @@ order to build the best MPI library available.
|
||||
#############################################################################
|
||||
|
||||
%package devel
|
||||
Summary: Development components for OpenMPI
|
||||
Summary: Development tools and header files for Open MPI
|
||||
Group: Development/Libraries
|
||||
Provides: mpi
|
||||
Requires: openmpi-runtime
|
||||
|
||||
%description devel
|
||||
Open MPI is a project combining technologies and resources from
|
||||
@ -140,7 +188,7 @@ several other projects (FT-MPI, LA-MPI, LAM/MPI, and PACX-MPI) in
|
||||
order to build the best MPI library available.
|
||||
|
||||
This subpackage provides the development files for Open MPI, such as
|
||||
header files for MPI development.
|
||||
wrapper compilers and header files for MPI development.
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
@ -149,7 +197,7 @@ header files for MPI development.
|
||||
#############################################################################
|
||||
|
||||
%package docs
|
||||
Summary: Documentation for OpenMPI
|
||||
Summary: Documentation for Open MPI
|
||||
Group: Development/Documentation
|
||||
|
||||
%description docs
|
||||
@ -159,36 +207,13 @@ MPI library available.
|
||||
|
||||
This subpackage provides the documentation for Open MPI.
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Preamble Section (mca-general)
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
# First conversations with Jeff and we were going to do this, but later we
|
||||
# decided that since these are pretty much always needed, they should be
|
||||
# included in the main pacakge. I am leaving this here just incase there
|
||||
# is a reason to re-include.
|
||||
|
||||
%package mca-general
|
||||
Summary: General communication modules for OpenMPI
|
||||
Group: Development/Libraries
|
||||
|
||||
%description mca-general
|
||||
Open MPI is a project 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.
|
||||
|
||||
This subpackage provides the general Module Component Architecture
|
||||
(MCA) components.
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
# Prepatory Section
|
||||
#
|
||||
#############################################################################
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -q -n openmpi-%{version}
|
||||
|
||||
#############################################################################
|
||||
#
|
||||
@ -199,10 +224,12 @@ This subpackage provides the general Module Component Architecture
|
||||
%build
|
||||
|
||||
CFLAGS="%{?cflags:%{cflags}}%{!?cflags:$RPM_OPT_FLAGS}"
|
||||
CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cflags:$RPM_OPT_FLAGS}"
|
||||
export CFLAGS CXXFLAGS
|
||||
CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cxxflags:$RPM_OPT_FLAGS}"
|
||||
F77FLAGS="%{?f77flags:%{f77flags}}%{!?f7flags:$RPM_OPT_FLAGS}"
|
||||
FCFLAGS="%{?fcflags:%{fcflags}}%{!?fcflags:$RPM_OPT_FLAGS}"
|
||||
export CFLAGS CXXFLAGS F77FLAGS FCFLAGS
|
||||
|
||||
%configure %{?acflags}
|
||||
%configure %{configure_options}
|
||||
%{__make} %{?mflags}
|
||||
|
||||
|
||||
@ -214,6 +241,13 @@ export CFLAGS CXXFLAGS
|
||||
%install
|
||||
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
|
||||
|
||||
# Currently remove a few executables that are not yet ready for prime
|
||||
# time
|
||||
|
||||
rm -f "$RPM_BUILD_ROOT/%{_bindir}/openmpi"
|
||||
rm -f "$RPM_BUILD_ROOT/%{_bindir}/orteconsole"
|
||||
rm -f "$RPM_BUILD_ROOT/%{_bindir}/orteprobe"
|
||||
|
||||
# An attempt to make enviornment happier when installed into non /usr path
|
||||
|
||||
%if %{install_env_scripts}
|
||||
@ -290,25 +324,27 @@ EOF
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Build the files lists. Since the files are still not completly known to me,
|
||||
# Build the files lists. Since the files are still not completly known,
|
||||
# it is easier to do some all-emcompasing find's.
|
||||
find $RPM_BUILD_ROOT -type f | \
|
||||
find $RPM_BUILD_ROOT -type f -o -type l | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@" |\
|
||||
grep -v "man" |\
|
||||
grep -v ".la" |\
|
||||
grep -v "include" > main.files
|
||||
egrep -v "README|INSTALL|LICENSE" > main.files
|
||||
|
||||
find $RPM_BUILD_ROOT -type f | \
|
||||
# Runtime files
|
||||
find $RPM_BUILD_ROOT -type f -o -type l | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@" |\
|
||||
egrep "lib\*.a|lib\*.so|.la|include" > devel.files
|
||||
egrep "lib.*.so|mca.*so|etc/openmpi|share/openmpi/.*txt" > runtime.files
|
||||
|
||||
find $RPM_BUILD_ROOT -type f | \
|
||||
# Devel files
|
||||
find $RPM_BUILD_ROOT -type f -o -type l | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@" |\
|
||||
egrep "/man/" > man.files
|
||||
egrep "lib.*\.a|lib.*\.la|/include/" > devel.files
|
||||
|
||||
find $RPM_BUILD_ROOT -type f | \
|
||||
sed -e "s@$RPM_BUILD_ROOT@@" |\
|
||||
egrep "mca\*so" > mca.files
|
||||
# Docs files
|
||||
# For when we have man pages / documentation
|
||||
#find $RPM_BUILD_ROOT -type f -o -type l | \
|
||||
# sed -e "s@$RPM_BUILD_ROOT@@" |\
|
||||
# egrep "/man/" > docs.files
|
||||
|
||||
|
||||
#############################################################################
|
||||
@ -336,18 +372,46 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
|
||||
# Files Section
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
%if %{build_all_in_one_rpm}
|
||||
|
||||
#
|
||||
# All in one RPM
|
||||
#
|
||||
|
||||
%files -f main.files
|
||||
%defattr(-, root, root)
|
||||
%doc README INSTALL LICENSE
|
||||
%doc README INSTALL LICENSE
|
||||
|
||||
%else
|
||||
|
||||
#
|
||||
# Sub-package RPMs
|
||||
#
|
||||
|
||||
%files runtime -f runtime.files
|
||||
%defattr(-, root, root)
|
||||
%doc README INSTALL LICENSE
|
||||
%{_bindir}/mpirun
|
||||
%{_bindir}/mpiexec
|
||||
%{_bindir}/ompi_info
|
||||
%{_bindir}/orterun
|
||||
%{_bindir}/orted
|
||||
|
||||
%files devel -f devel.files
|
||||
%defattr(-, root, root)
|
||||
%{_bindir}/mpicc
|
||||
%{_bindir}/mpiCC
|
||||
%{_bindir}/mpic++
|
||||
%{_bindir}/mpicxx
|
||||
%{_bindir}/mpif77
|
||||
%{_bindir}/mpif90
|
||||
|
||||
%files man -f man.files
|
||||
%defattr(-, root, root)
|
||||
# For when we have documentation
|
||||
#% files docs -f docs.files
|
||||
#% defattr(-, root, root)
|
||||
|
||||
%files mca-general -f mca.files
|
||||
%defattr(-, root, root)
|
||||
%endif
|
||||
|
||||
|
||||
#############################################################################
|
||||
@ -356,6 +420,13 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
|
||||
#
|
||||
#############################################################################
|
||||
%changelog
|
||||
* Wed Mar 30 2006 Jeff Squyres <jsquyres@cisco.com>
|
||||
- Lots of bit rot updates
|
||||
- Reorganize and rename the subpackages
|
||||
- Add / formalize a variety of rpmbuild --define options
|
||||
- Comment out the docs subpackage for the moment (until we have some
|
||||
documentation -- coming in v1.1!)
|
||||
|
||||
* Wed May 03 2005 Jeff Squyres <jsquyres@open-mpi.org>
|
||||
- Added some defines for LANL defaults
|
||||
- Added more defines for granulatirty of installation location for
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user