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