6e06a80
Name:		gromacs
4fd2f7f
Version:	4.0.5
0b7b88a
Release:	2%{?dist}
4fd2f7f
Summary:	Fast, Free and Flexible Molecular Dynamics
6e06a80
Group:		Applications/Engineering
6e06a80
License:	GPLv2+
6e06a80
URL:		http://www.gromacs.org
4fd2f7f
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6e06a80
Source0:	ftp://ftp.gromacs.org/pub/gromacs/gromacs-%{version}.tar.gz
ad6f154
Source1:	ftp://ftp.gromacs.org/pub/manual/manual-4.0.pdf
6e06a80
Source2:	gromacs-template-makefile-single
6e06a80
Source3:	gromacs-template-makefile-double
6e06a80
Source4:	gromacs-template-makefile-mpi-single
6e06a80
Source5:	gromacs-template-makefile-mpi-double
6e06a80
Source6:	gromacs-README.fedora
6e06a80
6e06a80
# Add shebangs to scripts
6e06a80
Patch0:		gromacs-GMXRC.patch
2d0f49e
# Patch gmxdemo for new filenames
2d0f49e
Patch1:		gromacs-gmxdemo.patch
4fd2f7f
# Patch configure for the library suffix
4fd2f7f
Patch2:		gromacs-configure.patch
6e06a80
4fd2f7f
Requires:	gromacs-common = %{version}-%{release}
6e06a80
6e06a80
BuildRequires:	fftw-devel
6e06a80
BuildRequires:	gsl-devel
6e06a80
BuildRequires:	libxml2-devel
6e06a80
BuildRequires:	openmpi-devel
6e06a80
6e06a80
%if 0%{?rhel} == 4
6e06a80
BuildRequires:	blas
6e06a80
BuildRequires:	lapack
6e06a80
BuildRequires:	xorg-x11-devel
6e06a80
%else
6e06a80
BuildRequires:	blas-devel
6e06a80
BuildRequires:	lapack-devel
6e06a80
BuildRequires:	libX11-devel
6e06a80
%endif
6e06a80
6e06a80
# Check for mpi-selector or environment-modules
6e06a80
4fd2f7f
%global selector 0
4fd2f7f
%global modules 0
6e06a80
6e06a80
%if 0%{?fedora} > 9
4fd2f7f
%global modules 1
6e06a80
%endif
6e06a80
6e06a80
%if 0%{?rhel} == 4
4fd2f7f
%global selector 1
6e06a80
%endif
6e06a80
6e06a80
%if 0%{?rhel} == 5
4fd2f7f
%global selector 1
6e06a80
%endif
6e06a80
6e06a80
%if %modules == 1
6e06a80
BuildRequires:	environment-modules
6e06a80
%endif
6e06a80
6e06a80
%if %selector == 1
6e06a80
BuildRequires:	mpi-selector
6e06a80
%endif
6e06a80
6e06a80
6e06a80
%description
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
6e06a80
This package provides single and double precision binaries.
6e06a80
The documentation is in the package gromacs-common.
6e06a80
4fd2f7f
N.B. All binaries have names starting with g_, for example mdrun has been
4fd2f7f
renamed to g_mdrun.
4fd2f7f
4fd2f7f
4fd2f7f
%package debug
4fd2f7f
Summary:	GROMACS debugging binaries without assembly loops
4fd2f7f
Group:		Applications/Engineering
4fd2f7f
Requires:	gromacs-common = %{version}-%{release}
4fd2f7f
4fd2f7f
%description debug
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package provides debugging versions of single and
4fd2f7f
double precision binaries, compiled without assembly loops.
4fd2f7f
The documentation is in the package gromacs-common.
4fd2f7f
You do not want this package for production purposes.
4fd2f7f
4fd2f7f
N.B. All binaries have names starting with g_, for example mdrun has been
4fd2f7f
renamed to g_mdrun.
4fd2f7f
6e06a80
6e06a80
%package libs
6e06a80
Summary:	GROMACS libraries
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	gromacs-common = %{version}-%{release}
6e06a80
6e06a80
%description libs
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package provides runtime libraries needed for the single and double
4fd2f7f
precision binaries.
4fd2f7f
4fd2f7f
4fd2f7f
%package debug-libs
4fd2f7f
Summary:	GROMACS libraries without assembly loops for debugging
4fd2f7f
Group:		Applications/Engineering
4fd2f7f
Requires:	gromacs-common = %{version}-%{release}
4fd2f7f
4fd2f7f
%description debug-libs
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package provides runtime libraries needed for the debugging versions of
4fd2f7f
the single and double precision binaries.
6e06a80
6e06a80
6e06a80
6e06a80
%package mpi
6e06a80
Summary:	GROMACS MPI binaries
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	gromacs-common = %{version}-%{release}
6e06a80
6e06a80
%description mpi
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package provides MPI single precision and double precision binaries.
4fd2f7f
4fd2f7f
4fd2f7f
%package debug-mpi
4fd2f7f
Summary:	GROMACS debugging MPI binaries without assembly loops
4fd2f7f
Group:		Applications/Engineering
4fd2f7f
Requires:	gromacs-common = %{version}-%{release}
4fd2f7f
4fd2f7f
%description debug-mpi
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package provides debugging versions of MPI single precision and double
6e06a80
precision binaries.
6e06a80
6e06a80
4fd2f7f
6e06a80
%package common
6e06a80
Summary:	GROMACS shared data and documentation
6e06a80
Group:		Applications/Engineering
6e06a80
6e06a80
%description common
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
4fd2f7f
This package includes architecture independent data and documentation.
6e06a80
6e06a80
6e06a80
%package devel
6e06a80
Summary:	GROMACS header files and development libraries
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	gromacs-common = %{version}-%{release}
6e06a80
Requires:	gromacs-libs = %{version}-%{release}
6e06a80
6e06a80
%description devel
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package contains header files and development libraries for the GROMACS
4fd2f7f
molecular dynamics software. You need it if you want to write your own analysis
4fd2f7f
programs.
4fd2f7f
4fd2f7f
4fd2f7f
4fd2f7f
%package debug-devel
4fd2f7f
Summary:	GROMACS debugging header files and development libraries
4fd2f7f
Group:		Applications/Engineering
4fd2f7f
Requires:	gromacs-common = %{version}-%{release}
4fd2f7f
Requires:	gromacs-devel = %{version}-%{release}
4fd2f7f
Requires:	gromacs-debug-libs = %{version}-%{release}
4fd2f7f
4fd2f7f
%description debug-devel
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package contains header files and development libraries for the debugging
4fd2f7f
version of the GROMACS molecular dynamics software.
6e06a80
6e06a80
6e06a80
6e06a80
%package mpi-devel
6e06a80
Summary:	GROMACS MPI development libraries
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	gromacs-mpi-libs = %{version}-%{release}
4fd2f7f
Requires:	gromacs-devel = %{version}-%{release}
a90b748
# Need to have this so that yum doesn't install LAM instead
a90b748
Requires:	openmpi
6e06a80
6e06a80
%description mpi-devel
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
6e06a80
This package contains development libraries for GROMACS MPI.
6e06a80
You need it if you want to write your own analysis programs.
6e06a80
6e06a80
4fd2f7f
%package debug-mpi-devel
4fd2f7f
Summary:	GROMACS debugging MPI development libraries
4fd2f7f
Group:		Applications/Engineering
4fd2f7f
Requires:	gromacs-debug-mpi-libs = %{version}-%{release}
4fd2f7f
Requires:	gromacs-debug-devel = %{version}-%{release}
4fd2f7f
# Need to have this so that yum doesn't install LAM instead
4fd2f7f
Requires:	openmpi
4fd2f7f
4fd2f7f
%description debug-mpi-devel
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package contains debugging versions of development libraries for the MPI
4fd2f7f
version of GROMACS.
4fd2f7f
4fd2f7f
6e06a80
%package mpi-libs
4fd2f7f
Summary:	GROMACS MPI libraries
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	gromacs-common = %{version}-%{release}
a90b748
# Need to have this so that yum doesn't install LAM instead
a90b748
Requires:	openmpi
6e06a80
6e06a80
%description mpi-libs
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
4fd2f7f
4fd2f7f
This package provides runtime libraries needed for the MPI single and double
4fd2f7f
precision binaries.
4fd2f7f
4fd2f7f
4fd2f7f
%package debug-mpi-libs
4fd2f7f
Summary:	GROMACS debugging MPI libraries
4fd2f7f
Group:		Applications/Engineering
4fd2f7f
Requires:	gromacs-common = %{version}-%{release}
4fd2f7f
# Need to have this so that yum doesn't install LAM instead
4fd2f7f
Requires:	openmpi
4fd2f7f
4fd2f7f
%description debug-mpi-libs
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
4fd2f7f
This package provides debugging versions of runtime libraries needed for the
4fd2f7f
debug versions of the MPI single and double precision binaries.
6e06a80
6e06a80
6e06a80
%package bash
6e06a80
Summary:	GROMACS bash completion
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	bash-completion
6e06a80
6e06a80
%description bash
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
4fd2f7f
This package provides bash completion for GROMACS.
6e06a80
6e06a80
6e06a80
%package zsh
6e06a80
Summary:	GROMACS zsh support
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	zsh
6e06a80
6e06a80
%description zsh
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
4fd2f7f
This package provides scripts needed to run GROMACS with zsh and zsh
4fd2f7f
completion.
6e06a80
6e06a80
6e06a80
%package csh
6e06a80
Summary:	GROMACS csh support
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	csh
6e06a80
6e06a80
%description csh
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
4fd2f7f
This package provides scripts needed to run GROMACS with csh and a completion
4fd2f7f
script.
6e06a80
6e06a80
%package tutor
6e06a80
Summary:	GROMACS tutorial files
6e06a80
Group:		Applications/Engineering
6e06a80
Requires:	gromacs-common = %{version}-%{release}
6e06a80
6e06a80
%description tutor
4fd2f7f
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7f
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7f
It is developed for biomolecules like proteins, but the extremely high
4fd2f7f
performance means it is used also in several other field like polymer chemistry
4fd2f7f
and solid state physics.
6e06a80
6e06a80
This package provides tutorials for the use of GROMACS.
6e06a80
6e06a80
%prep
6e06a80
%setup -q
4fd2f7f
%patch0 -p1 -b .gmxrc
4fd2f7f
%patch1 -p1 -b .gmxdemo
4fd2f7f
%patch2 -p1 -b .libsuffix
6e06a80
6e06a80
# Fix incorrect permission
4fd2f7f
#chmod a-x src/tools/gmx_xpm2ps.c
6e06a80
6e06a80
6e06a80
6e06a80
%build
6e06a80
# Assembly kernels haven't got .note.GNU-stack sections
6e06a80
# because of incompatibilies with Microsoft Assembler.
6e06a80
# Add noexecstack to compiler flags
6e06a80
a90b748
export CFLAGS="%optflags -Wa,--noexecstack -fPIC"
6e06a80
export LIBS="-lblas -llapack"
6e06a80
4fd2f7f
# Default options, used for all compilations
4fd2f7f
export DEFOPTS="--enable-shared --disable-static --with-external-blas \
4fd2f7f
	--with-external-lapack --with-gsl --with-x"
4fd2f7f
export SINGLE="--enable-float" # Single precision
4fd2f7f
export DOUBLE="--disable-float" # Double precision
4fd2f7f
export MPI="--enable-mpi"
4fd2f7f
export NOASM="--disable-ia32-3dnow --disable-ia32-sse --disable-x86-64-sse \
4fd2f7f
	--disable-ppc-altivec --disable-ia64-asm"
4fd2f7f
4fd2f7f
6e06a80
# Single precision
6e06a80
mkdir single
6e06a80
cd single
4fd2f7f
sed "s|@LIBSUFFIX@||g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $SINGLE
6e06a80
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
6e06a80
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
6e06a80
6e06a80
make %{?_smp_mflags}
6e06a80
cd ..
6e06a80
4fd2f7f
# Single precision, debug version with no assembly loops
4fd2f7f
mkdir single-debug
4fd2f7f
cd single-debug
4fd2f7f
sed "s|@LIBSUFFIX@|_debug|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $SINGLE $NOASM --program-suffix="_debug"
4fd2f7f
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
4fd2f7f
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
4fd2f7f
4fd2f7f
make %{?_smp_mflags}
4fd2f7f
cd ..
4fd2f7f
4fd2f7f
4fd2f7f
6e06a80
# Double precision
6e06a80
mkdir double
6e06a80
cd double
4fd2f7f
sed "s|@LIBSUFFIX@|_d|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $DOUBLE --program-suffix="_d"
6e06a80
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
6e06a80
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
6e06a80
6e06a80
make %{?_smp_mflags}
6e06a80
cd ..
6e06a80
4fd2f7f
# Double precision, debug version with no assembly loops
4fd2f7f
mkdir double-debug
4fd2f7f
cd double-debug
4fd2f7f
sed "s|@LIBSUFFIX@|_d_debug|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $DOUBLE $NOASM --program-suffix="_d_debug"
4fd2f7f
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
4fd2f7f
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
4fd2f7f
4fd2f7f
make %{?_smp_mflags}
4fd2f7f
cd ..
4fd2f7f
4fd2f7f
4fd2f7f
6e06a80
# Load MPI enviroment
6e06a80
6e06a80
%if %modules == 1
6e06a80
. /etc/profile.d/modules.sh
6e06a80
module load %{_libdir}/openmpi/*/openmpi.module
4fd2f7f
# The module overrides CFLAGS, need to set them again..
4fd2f7f
export CFLAGS="%optflags -Wa,--noexecstack -fPIC"
6e06a80
%endif
6e06a80
6e06a80
%if %selector == 1
6e06a80
# Set MPI environment
6e06a80
mpi-selector --set `mpi-selector --list | grep openmpi`
6e06a80
source /etc/profile.d/mpi-selector.sh
6e06a80
%endif
6e06a80
6e06a80
6e06a80
# MPI, single precision
6e06a80
6e06a80
mkdir mpi-single
6e06a80
cd mpi-single
4fd2f7f
sed "s|@LIBSUFFIX@|_mpi|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $SINGLE $MPI --program-suffix="_mpi"
4fd2f7f
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
4fd2f7f
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
4fd2f7f
4fd2f7f
make %{?_smp_mflags} mdrun
4fd2f7f
#make %{?_smp_mflags}
4fd2f7f
cd ..
4fd2f7f
4fd2f7f
mkdir mpi-single-debug
4fd2f7f
cd mpi-single-debug
4fd2f7f
sed "s|@LIBSUFFIX@|_mpi_debug|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $SINGLE $MPI $NOASM --program-suffix="_mpi_debug"
6e06a80
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
6e06a80
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
6e06a80
6e06a80
make %{?_smp_mflags} mdrun
6e06a80
#make %{?_smp_mflags}
6e06a80
cd ..
6e06a80
4fd2f7f
4fd2f7f
6e06a80
# MPI, double precision
6e06a80
mkdir mpi-double
6e06a80
cd mpi-double
4fd2f7f
sed "s|@LIBSUFFIX@|_mpi_d|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $DOUBLE $MPI --program-suffix="_mpi_d"
4fd2f7f
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
4fd2f7f
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
4fd2f7f
4fd2f7f
make %{?_smp_mflags} mdrun
4fd2f7f
#make %{?_smp_mflags}
4fd2f7f
cd ..
4fd2f7f
4fd2f7f
mkdir mpi-double-debug
4fd2f7f
cd mpi-double-debug
4fd2f7f
sed "s|@LIBSUFFIX@|_mpi_d_debug|g" < ../configure > configure; chmod 777 configure
4fd2f7f
%configure $DEFOPTS $DOUBLE $MPI $NOASM --program-suffix="_mpi_d_debug"
6e06a80
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
6e06a80
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
6e06a80
6e06a80
make %{?_smp_mflags} mdrun
6e06a80
#make %{?_smp_mflags}
6e06a80
cd ..
6e06a80
6e06a80
6e06a80
%install
6e06a80
rm -rf %{buildroot}
6e06a80
26363c1
# 4.0.3 needs this to build in EPEL-4
26363c1
# Load MPI enviroment
26363c1
%if %modules == 1
26363c1
. /etc/profile.d/modules.sh
26363c1
module load %{_libdir}/openmpi/*/openmpi.module
4fd2f7f
export CFLAGS="%optflags -Wa,--noexecstack -fPIC"
26363c1
%endif
26363c1
26363c1
%if %selector == 1
26363c1
# Set MPI environment
26363c1
mpi-selector --set `mpi-selector --list | grep openmpi`
26363c1
source /etc/profile.d/mpi-selector.sh
26363c1
%endif
26363c1
26363c1
6e06a80
# Single precision
6e06a80
cd single
6e06a80
make DESTDIR=%{buildroot} INSTALL="install -p" install
6e06a80
cd ..
6e06a80
4fd2f7f
cd single-debug
4fd2f7f
make DESTDIR=%{buildroot} INSTALL="install -p" install
4fd2f7f
cd ..
4fd2f7f
6e06a80
# Double precision
6e06a80
cd double
6e06a80
make DESTDIR=%{buildroot} INSTALL="install -p" install
6e06a80
cd ..
6e06a80
4fd2f7f
cd double-debug
4fd2f7f
make DESTDIR=%{buildroot} INSTALL="install -p" install
4fd2f7f
cd ..
4fd2f7f
6e06a80
6e06a80
6e06a80
# MPI, single precision
6e06a80
cd mpi-single
6e06a80
make DESTDIR=%{buildroot} INSTALL="install -p" install-mdrun
6e06a80
cd ..
6e06a80
4fd2f7f
cd mpi-single-debug
4fd2f7f
make DESTDIR=%{buildroot} INSTALL="install -p" install-mdrun
4fd2f7f
cd ..
4fd2f7f
4fd2f7f
6e06a80
# MPI, double precision
6e06a80
cd mpi-double
6e06a80
make DESTDIR=%{buildroot} INSTALL="install -p" install-mdrun
6e06a80
cd ..
6e06a80
4fd2f7f
cd mpi-double-debug
4fd2f7f
make DESTDIR=%{buildroot} INSTALL="install -p" install-mdrun
4fd2f7f
cd ..
4fd2f7f
4fd2f7f
6e06a80
# Install manual & packager's note
6e06a80
install -cpm 644 %{SOURCE1} .
6e06a80
install -cpm 644 %{SOURCE6} README.fedora
6e06a80
6e06a80
# Remove broken makefiles generated by build process
6e06a80
rm -rf %{buildroot}%{_datadir}/%{name}/template/Makefil*
6e06a80
# Install template makefiles
6e06a80
install -cpm 644 %{SOURCE2} %{buildroot}%{_datadir}/%{name}/template/Makefile.single
6e06a80
install -cpm 644 %{SOURCE3} %{buildroot}%{_datadir}/%{name}/template/Makefile.double
6e06a80
install -cpm 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}/template/Makefile.mpi.single
6e06a80
install -cpm 644 %{SOURCE5} %{buildroot}%{_datadir}/%{name}/template/Makefile.mpi.double
6e06a80
6e06a80
6e06a80
# Fix GMXRC file permissions
6e06a80
chmod a+x %{buildroot}%{_bindir}/GMXRC %{buildroot}%{_bindir}/GMXRC.*
6e06a80
6e06a80
# Rename binaries and man pages to prevent clashes
6e06a80
# (This is done here so that we don't need to mess with machine generated makefiles.
6e06a80
for bin in anadock do_dssp editconf eneconv genbox genconf genion genrestr gmxcheck gmxdump grompp highway luck make_edi make_ndx mdrun mk_angndx ngmx pdb2gmx protonate sigeps tpbconv trjcat trjconv trjorder wheel x2top xpm2ps xrama ; do 
6e06a80
mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/g_${bin}
4fd2f7f
mv %{buildroot}%{_bindir}/${bin}_debug %{buildroot}%{_bindir}/g_${bin}_debug
6e06a80
mv %{buildroot}%{_bindir}/${bin}_d %{buildroot}%{_bindir}/g_${bin}_d
4fd2f7f
mv %{buildroot}%{_bindir}/${bin}_d_debug %{buildroot}%{_bindir}/g_${bin}_d_debug
6e06a80
done
6e06a80
6e06a80
for bin in demux.pl xplor2gmx.pl; do
6e06a80
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/g_${bin}
6e06a80
done
6e06a80
6e06a80
# MPI-enabled binaries (list will continue when the makefile has
6e06a80
# the possibility to compile all mpi-enabled files
6e06a80
for mpibin in mdrun; do
6e06a80
mv %{buildroot}%{_bindir}/${mpibin}_mpi %{buildroot}%{_bindir}/g_${mpibin}_mpi
4fd2f7f
mv %{buildroot}%{_bindir}/${mpibin}_mpi_debug %{buildroot}%{_bindir}/g_${mpibin}_mpi_debug
6e06a80
mv %{buildroot}%{_bindir}/${mpibin}_mpi_d %{buildroot}%{_bindir}/g_${mpibin}_mpi_d
4fd2f7f
mv %{buildroot}%{_bindir}/${mpibin}_mpi_d_debug %{buildroot}%{_bindir}/g_${mpibin}_mpi_d_debug
6e06a80
done
6e06a80
6e06a80
# Man pages
6e06a80
for bin in anadock do_dssp editconf eneconv genbox genconf genion genrestr gmxcheck gmxdump grompp highway make_edi make_ndx mdrun mk_angndx ngmx pdb2gmx protonate sigeps tpbconv trjcat trjconv trjorder wheel x2top xpm2ps xrama ; do 
6e06a80
mv %{buildroot}%{_mandir}/man1/${bin}.1 %{buildroot}%{_mandir}/man1/g_${bin}.1
6e06a80
mv %{buildroot}%{_mandir}/man1/${bin}_d.1 %{buildroot}%{_mandir}/man1/g_${bin}_d.1
6e06a80
done
6e06a80
6e06a80
# Move completion files around
6e06a80
chmod a-x %{buildroot}%{_bindir}/completion.*
6e06a80
# Zsh
6e06a80
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
6e06a80
mv %{buildroot}%{_bindir}/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/gromacs
6e06a80
# Bash
6e06a80
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
6e06a80
mv %{buildroot}%{_bindir}/completion.bash %{buildroot}/etc/bash_completion.d/gromacs
6e06a80
# Tcsh
6e06a80
mv %{buildroot}%{_bindir}/completion.csh . 
6e06a80
6e06a80
# Remove .la files
6e06a80
rm -rf %{buildroot}/%{_libdir}/*.la
6e06a80
6e06a80
# Post install for libs
6e06a80
6e06a80
%post libs -p /sbin/ldconfig
6e06a80
6e06a80
%postun libs -p /sbin/ldconfig
6e06a80
4fd2f7f
%post debug-libs -p /sbin/ldconfig
4fd2f7f
4fd2f7f
%postun debug-libs -p /sbin/ldconfig
4fd2f7f
6e06a80
%post mpi-libs -p /sbin/ldconfig
6e06a80
6e06a80
%postun mpi-libs -p /sbin/ldconfig
6e06a80
4fd2f7f
%post debug-mpi-libs -p /sbin/ldconfig
4fd2f7f
4fd2f7f
%postun debug-mpi-libs -p /sbin/ldconfig
4fd2f7f
4fd2f7f
6e06a80
6e06a80
%clean
6e06a80
rm -rf %{buildroot}
6e06a80
6e06a80
6e06a80
6e06a80
6e06a80
# Files section
6e06a80
6e06a80
%files
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_bindir}/*
4fd2f7f
%exclude %{_bindir}/*_debug
4fd2f7f
%exclude %{_bindir}/g_mdrun_mpi*
6e06a80
%exclude %{_bindir}/GMXRC*
6e06a80
4fd2f7f
%files debug
4fd2f7f
%defattr(-,root,root,-)
4fd2f7f
%{_bindir}/*_debug
4fd2f7f
%exclude %{_bindir}/g_mdrun_mpi_debug
4fd2f7f
%exclude %{_bindir}/g_mdrun_mpi_d_debug
4fd2f7f
6e06a80
%files libs
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_libdir}/libgmx.so.*
6e06a80
%{_libdir}/libgmx_d.so.*
6e06a80
%{_libdir}/libgmxana.so.*
6e06a80
%{_libdir}/libgmxana_d.so.*
6e06a80
%{_libdir}/libmd.so.*
6e06a80
%{_libdir}/libmd_d.so.*
6e06a80
4fd2f7f
%files debug-libs
4fd2f7f
%defattr(-,root,root,-)
4fd2f7f
%{_libdir}/libgmx_debug.so.*
4fd2f7f
%{_libdir}/libgmx_d_debug.so.*
4fd2f7f
%{_libdir}/libgmxana_debug.so.*
4fd2f7f
%{_libdir}/libgmxana_d_debug.so.*
4fd2f7f
%{_libdir}/libmd_debug.so.*
4fd2f7f
%{_libdir}/libmd_d_debug.so.*
4fd2f7f
4fd2f7f
6e06a80
%files mpi
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_bindir}/g_mdrun_mpi
6e06a80
%{_bindir}/g_mdrun_mpi_d
6e06a80
4fd2f7f
%files debug-mpi
4fd2f7f
%defattr(-,root,root,-)
4fd2f7f
%{_bindir}/g_mdrun_mpi_debug
4fd2f7f
%{_bindir}/g_mdrun_mpi_d_debug
6e06a80
6e06a80
%files mpi-libs
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_libdir}/libgmx_mpi.so.*
6e06a80
%{_libdir}/libgmx_mpi_d.so.*
6e06a80
%{_libdir}/libmd_mpi.so.*
6e06a80
%{_libdir}/libmd_mpi_d.so.*
6e06a80
4fd2f7f
%files debug-mpi-libs
4fd2f7f
%defattr(-,root,root,-)
4fd2f7f
%{_libdir}/libgmx_mpi_debug.so.*
4fd2f7f
%{_libdir}/libgmx_mpi_d_debug.so.*
4fd2f7f
%{_libdir}/libmd_mpi_debug.so.*
4fd2f7f
%{_libdir}/libmd_mpi_d_debug.so.*
6e06a80
6e06a80
6e06a80
%files common
6e06a80
%defattr(-,root,root,-)
ad6f154
%doc AUTHORS COPYING README manual-4.0.pdf README.fedora
6e06a80
%{_bindir}/GMXRC
6e06a80
%{_bindir}/GMXRC.bash
6e06a80
%{_mandir}/man1/*
6e06a80
%{_datadir}/%{name}
6e06a80
%exclude %{_datadir}/%{name}/template
6e06a80
%exclude %{_datadir}/%{name}/tutor
6e06a80
6e06a80
%files devel
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_includedir}/%{name}
6e06a80
%{_libdir}/libgmx.so
6e06a80
%{_libdir}/libgmx_d.so
6e06a80
%{_libdir}/libgmxana.so
6e06a80
%{_libdir}/libgmxana_d.so
6e06a80
%{_libdir}/libmd.so
6e06a80
%{_libdir}/libmd_d.so
6e06a80
%{_datadir}/%{name}/template
6e06a80
%exclude %{_datadir}/%{name}/template/Makefile.mpi.*
6e06a80
4fd2f7f
%files debug-devel
4fd2f7f
%defattr(-,root,root,-)
4fd2f7f
%{_libdir}/libgmx_debug.so
4fd2f7f
%{_libdir}/libgmx_d_debug.so
4fd2f7f
%{_libdir}/libgmxana_debug.so
4fd2f7f
%{_libdir}/libgmxana_d_debug.so
4fd2f7f
%{_libdir}/libmd_debug.so
4fd2f7f
%{_libdir}/libmd_d_debug.so
4fd2f7f
6e06a80
%files mpi-devel
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_libdir}/libgmx_mpi.so
6e06a80
%{_libdir}/libgmx_mpi_d.so
6e06a80
%{_libdir}/libmd_mpi.so
6e06a80
%{_libdir}/libmd_mpi_d.so
6e06a80
%{_datadir}/%{name}/template/Makefile.mpi.*
6e06a80
4fd2f7f
%files debug-mpi-devel
4fd2f7f
%defattr(-,root,root,-)
4fd2f7f
%{_libdir}/libgmx_mpi_debug.so
4fd2f7f
%{_libdir}/libgmx_mpi_d_debug.so
4fd2f7f
%{_libdir}/libmd_mpi_debug.so
4fd2f7f
%{_libdir}/libmd_mpi_d_debug.so
4fd2f7f
6e06a80
6e06a80
%files zsh
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_datadir}/zsh/site-functions/gromacs
6e06a80
%{_bindir}/GMXRC.zsh
6e06a80
6e06a80
%files bash
6e06a80
%defattr(-,root,root,-)
6e06a80
%config(noreplace) %{_sysconfdir}/bash_completion.d/gromacs
6e06a80
6e06a80
6e06a80
%files csh
6e06a80
%defattr(-,root,root,-)
6e06a80
%doc completion.csh
6e06a80
%{_bindir}/GMXRC.csh
6e06a80
6e06a80
%files tutor
6e06a80
%defattr(-,root,root,-)
6e06a80
%{_datadir}/%{name}/tutor
6e06a80
6e06a80
6e06a80
%changelog
0b7b88a
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.5-2
0b7b88a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0b7b88a
4fd2f7f
* Fri May 22 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.5-1
4fd2f7f
- Update to 4.0.5.
4fd2f7f
- Change spec %%defines to %%globals.
4fd2f7f
- Add debug subpackages to make debugging of GROMACS possible.
35dce57
ed60a6b
* Tue Feb 17 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.4-1
ed60a6b
- Update to 4.0.4.
ed60a6b
0ff216d
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-4
0ff216d
- Retry fixing gmxdemo.
0ff216d
2d0f49e
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-3
2d0f49e
- Fixed gmxdemo.
2d0f49e
26363c1
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-2
26363c1
- Fix EPEL 4 build.
26363c1
7b3f14a
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-1
7b3f14a
- Update to 4.0.3.
7b3f14a
ad6f154
* Wed Jan 14 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.2-7
ad6f154
- Update manual to latest version.
ad6f154
- Removed Requires: blas and lapack.
ad6f154
ad6f154
* Mon Nov 10 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.2-6
bb4bd8c
- Update to 4.0.2.
bb4bd8c
ad6f154
* Sun Nov 09 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.1-5
3f6f449
- Add Requires: blas too.
3f6f449
ad6f154
* Sun Nov 09 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.1-4
a90b748
- Update to 4.0.1.
a90b748
- Add Requires: lapack and openmpi to prevent yum from pulling atlas and lam
a90b748
instead.
a90b748
ad6f154
* Wed Oct 15 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-3
6e06a80
- Rename also man pages.
6e06a80
ad6f154
* Mon Oct 13 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-2
6e06a80
- Added noreplace to bash completion file.
6e06a80
- Changed double precision mpi binary suffix to _mpi_d.
6e06a80
ad6f154
* Sun Oct 12 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-1
6e06a80
- Update to Gromacs 4.0.
6e06a80
- Remove module system and patch file names to begin with g_.
6e06a80
ad6f154
* Wed Oct 08 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.15.rc3
6e06a80
- Changed location of binaries.
6e06a80
- Removed conflict of module file, as the program is binary compatible with older versions.
6e06a80
ad6f154
* Wed Oct 08 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.14.rc3
6e06a80
- The gromacs module is loaded automatically and it conflicts with gromacs3.
6e06a80
ad6f154
* Tue Oct 07 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.13.rc3
6e06a80
- Renamed module files from %%{name}-%%{version} to %%{name}.
6e06a80
ad6f154
* Mon Oct 06 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.12.rc3
6e06a80
- Fix BR to get GROMACS to build in mock for epel-4.
6e06a80
ad6f154
* Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.11.rc3
6e06a80
- Fix to get GROMACS to build in mock for epel-5.
6e06a80
ad6f154
* Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.10.rc3
6e06a80
- Implement module system & remove binary renaming.
6e06a80
- No need for autoreconf anymore.
6e06a80
- Update to rc3.
6e06a80
ad6f154
* Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.9.rc2
6e06a80
- Fall back to autoreconf due to binary renaming.
6e06a80
ad6f154
* Fri Oct 03 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.8.rc2
6e06a80
- Modified install commands to preserve timestamps.
6e06a80
ad6f154
* Fri Oct 03 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.7.rc2
6e06a80
- Even more review fixes.
6e06a80
- Binaries renamed:
6e06a80
	highway	->	g_highway
6e06a80
	luck	->	g_luck
6e06a80
	sigeps	->	g_sigeps
6e06a80
	wheel	->	g_wheel
6e06a80
ad6f154
* Thu Oct 02 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.6.rc2
6e06a80
- Final review fixes.
6e06a80
ad6f154
* Wed Oct 01 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.5.rc2
6e06a80
- Strip down requires by branching tutor to its own package.
6e06a80
ad6f154
* Tue Sep 30 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.4.rc2
6e06a80
- Extensive package review fixes.
6e06a80
- Unclear licenses on some files, filed upstream bug 217.
6e06a80
  http://bugzilla.gromacs.org/show_bug.cgi?id=217
6e06a80
ad6f154
* Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.3.rc2
6e06a80
- Move .so files to -devel package.
6e06a80
- Remove .la files.
6e06a80
ad6f154
* Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.2.rc2
6e06a80
- Implement out-of-tree-builds.
6e06a80
- Add --noexecstack to CFLAGS.
6e06a80
- Remove execstack procedure and prelink from buildreqs.
6e06a80
- Filed upstream bug 215 to add .note.GNU-stack .
6e06a80
- Fix incorrect file permission on src/tools/gmx_xpm2ps.c .
6e06a80
ad6f154
* Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.1.rc2
6e06a80
- Alphabetized buildrequires.
6e06a80
- Changed gromacs-share to gromacs-common.
6e06a80
ad6f154
* Fri Sep 26 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.0.rc2
6e06a80
- Initial build.