dd1e26
%ifnarch s390 s390x
dd1e26
%global with_openmpi 1
dd1e26
%else
dd1e26
%global with_openmpi 0
dd1e26
%endif
dd1e26
6e06a8
Name:		gromacs
fead7d
Version:	4.5.3
afadb8
Release:	4%{?dist}
4fd2f7
Summary:	Fast, Free and Flexible Molecular Dynamics
6e06a8
Group:		Applications/Engineering
6e06a8
License:	GPLv2+
6e06a8
URL:		http://www.gromacs.org
4fd2f7
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
6e06a8
Source0:	ftp://ftp.gromacs.org/pub/gromacs/gromacs-%{version}.tar.gz
939be9
# File gotten from http://www.gromacs.org/@api/deki/files/126/=gromacs_manual-4.5.pdf
939be9
Source1:	manual-4.5.pdf
6e06a8
Source2:	gromacs-template-makefile-single
6e06a8
Source3:	gromacs-template-makefile-double
6e06a8
Source4:	gromacs-template-makefile-mpi-single
6e06a8
Source5:	gromacs-template-makefile-mpi-double
6e06a8
Source6:	gromacs-README.fedora
6e06a8
6e06a8
# Add shebangs to scripts
6e06a8
Patch0:		gromacs-GMXRC.patch
2d0f49
# Patch gmxdemo for new filenames
2d0f49
Patch1:		gromacs-gmxdemo.patch
6e06a8
939be9
BuildRequires:	cmake
939be9
BuildRequires:	atlas-devel
6e06a8
BuildRequires:	fftw-devel
6e06a8
BuildRequires:	gsl-devel
1b055a
BuildRequires:	libxml2-devel
6e06a8
BuildRequires:	libX11-devel
6e06a8
1b055a
Requires:	gromacs-common = %{version}-%{release}
6e06a8
b830fd
# Libs were branched from gromacs, so there are 64-bit installs that have 32-bit packages installed
b830fd
Obsoletes:	gromacs < 4.5.2-1 
b830fd
b830fd
6e06a8
%description
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
6e06a8
This package provides single and double precision binaries.
6e06a8
The documentation is in the package gromacs-common.
6e06a8
939be9
mdrun has been compiled with thread parallellization, so it runs in parallel
939be9
on shared memory systems. If you want to run on a cluster, you probably want
939be9
to install one of the MPI parallellized packages.
939be9
4fd2f7
N.B. All binaries have names starting with g_, for example mdrun has been
4fd2f7
renamed to g_mdrun.
4fd2f7
4fd2f7
6e06a8
%package common
6e06a8
Summary:	GROMACS shared data and documentation
6e06a8
Group:		Applications/Engineering
1b055a
BuildArch:	noarch
1b055a
# Due to switch to noarch package
7fad78
Obsoletes:	gromacs-common < 4.0.7-1
6e06a8
6e06a8
%description common
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
4fd2f7
This package includes architecture independent data and documentation.
6e06a8
6e06a8
6e06a8
%package devel
6e06a8
Summary:	GROMACS header files and development libraries
6e06a8
Group:		Applications/Engineering
1b055a
Requires:	gromacs = %{version}-%{release}
6e06a8
6e06a8
%description devel
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
4fd2f7
4fd2f7
This package contains header files and development libraries for the GROMACS
4fd2f7
molecular dynamics software. You need it if you want to write your own analysis
4fd2f7
programs.
4fd2f7
4fd2f7
7fad78
%package libs
7fad78
Summary:	GROMACS shared libraries
7fad78
Group:		System Environment/Libraries
7fad78
7fad78
%description libs
7fad78
GROMACS is a versatile and extremely well optimized package to perform
7fad78
molecular dynamics computer simulations and subsequent trajectory analysis.
7fad78
It is developed for biomolecules like proteins, but the extremely high
7fad78
performance means it is used also in several other field like polymer chemistry
7fad78
and solid state physics.
7fad78
7fad78
This package contains libraries needed for operation of GROMACS.
7fad78
7fad78
dd1e26
%if %{with_openmpi}
1b055a
%package openmpi
1b055a
Summary:	GROMACS Open MPI binaries and libraries
4fd2f7
Group:		Applications/Engineering
1b055a
Obsoletes:	gromacs-mpi < %{version}-%{release}
4fd2f7
Requires:	gromacs-common = %{version}-%{release}
1b055a
BuildRequires:	openmpi-devel
a90b74
Requires:	openmpi
9c3bc4
# Libs were branched from gromacs, so there are 64-bit installs that have 32-bit packages installed
9c3bc4
Obsoletes:	gromacs-openmpi < 4.5.3-2
6e06a8
1b055a
%description openmpi
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
939be9
mdrun has been compiled with thread parallellization (for running on
939be9
a single node) and with Open MPI (for running on multiple nodes).
939be9
This package single and double precision binaries and libraries.
6e06a8
6e06a8
7fad78
%package openmpi-libs
7fad78
Summary:	GROMACS Open MPI shared libraries
7fad78
Group:		System Environment/Libraries
7fad78
Obsoletes:	gromacs-mpi-libs < %{version}-%{release}
7fad78
Requires:	openmpi
7fad78
7fad78
%description openmpi-libs
7fad78
GROMACS is a versatile and extremely well optimized package to perform
7fad78
molecular dynamics computer simulations and subsequent trajectory analysis.
7fad78
It is developed for biomolecules like proteins, but the extremely high
7fad78
performance means it is used also in several other field like polymer chemistry
7fad78
and solid state physics.
7fad78
7fad78
This package contains libraries needed for operation of GROMACS Open MPI.
7fad78
7fad78
1b055a
%package openmpi-devel
1b055a
Summary:	GROMACS Open MPI development libraries
4fd2f7
Group:		Applications/Engineering
1b055a
Obsoletes:	gromacs-mpi-devel < %{version}-%{release}
1b055a
Requires:	gromacs-devel = %{version}-%{release}
031fca
Requires:	gromacs-openmpi = %{version}-%{release}
1b055a
Requires:	openmpi-devel
4fd2f7
6e06a8
1b055a
%description openmpi-devel
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
4fd2f7
1b055a
This package contains development libraries for GROMACS Open MPI.
939be9
You may need it if you want to write your own analysis programs.
dd1e26
%endif
4fd2f7
4fd2f7
e3131b
%package mpich2
e3131b
Summary:	GROMACS MPICH2 binaries and libraries
e3131b
Group:		Applications/Engineering
e3131b
Requires:	gromacs-common = %{version}-%{release}
e3131b
Requires:	mpich2
9c3bc4
# Libs were branched from gromacs, so there are 64-bit installs that have 32-bit packages installed
9c3bc4
Obsoletes:	gromacs-mpich2 < 4.5.3-2
e3131b
e3131b
%description mpich2
e3131b
GROMACS is a versatile and extremely well optimized package to perform
e3131b
molecular dynamics computer simulations and subsequent trajectory analysis.
e3131b
It is developed for biomolecules like proteins, but the extremely high
e3131b
performance means it is used also in several other field like polymer chemistry
e3131b
and solid state physics.
e3131b
939be9
mdrun has been compiled with thread parallellization (for running on
939be9
a single node) and with MPICH2 (for running on multiple nodes).
939be9
This package single and double precision binaries and libraries.
e3131b
7fad78
%package mpich2-libs
7fad78
Summary:	GROMACS MPICH2 shared libraries
7fad78
Group:		System Environment/Libraries
7fad78
Requires:	mpich2
7fad78
7fad78
%description mpich2-libs
7fad78
GROMACS is a versatile and extremely well optimized package to perform
7fad78
molecular dynamics computer simulations and subsequent trajectory analysis.
7fad78
It is developed for biomolecules like proteins, but the extremely high
7fad78
performance means it is used also in several other field like polymer chemistry
7fad78
and solid state physics.
7fad78
7fad78
This package contains libraries needed for operation of GROMACS MPICH2.
7fad78
7fad78
e3131b
%package mpich2-devel
e3131b
Summary:	GROMACS MPICH2 development libraries
e3131b
Group:		Applications/Engineering
e3131b
Requires:	gromacs-devel = %{version}-%{release}
031fca
Requires:	gromacs-mpich2 = %{version}-%{release}
e3131b
BuildRequires:	mpich2-devel
e3131b
Requires:	mpich2-devel
e3131b
e3131b
%description mpich2-devel
e3131b
GROMACS is a versatile and extremely well optimized package to perform
e3131b
molecular dynamics computer simulations and subsequent trajectory analysis.
e3131b
It is developed for biomolecules like proteins, but the extremely high
e3131b
performance means it is used also in several other field like polymer chemistry
e3131b
and solid state physics.
e3131b
e3131b
This package contains development libraries for GROMACS MPICH2.
939be9
You may need it if you want to write your own analysis programs.
4fd2f7
6e06a8
6e06a8
6e06a8
%package bash
6e06a8
Summary:	GROMACS bash completion
6e06a8
Group:		Applications/Engineering
6e06a8
Requires:	bash-completion
1b055a
BuildArch:	noarch
1b055a
# Due to switch to noarch package
7fad78
Obsoletes:	gromacs-bash < 4.0.7-1 
1b055a
6e06a8
6e06a8
%description bash
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
4fd2f7
This package provides bash completion for GROMACS.
6e06a8
6e06a8
6e06a8
%package zsh
6e06a8
Summary:	GROMACS zsh support
6e06a8
Group:		Applications/Engineering
6e06a8
Requires:	zsh
1b055a
BuildArch:	noarch
1b055a
# Due to switch to noarch package
7fad78
Obsoletes:	gromacs-zsh < 4.0.7-1
1b055a
6e06a8
6e06a8
%description zsh
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
4fd2f7
This package provides scripts needed to run GROMACS with zsh and zsh
4fd2f7
completion.
6e06a8
6e06a8
6e06a8
%package csh
6e06a8
Summary:	GROMACS csh support
6e06a8
Group:		Applications/Engineering
6e06a8
Requires:	csh
1b055a
BuildArch:	noarch
1b055a
# Due to switch to noarch package
7fad78
Obsoletes:	gromacs-csh < 4.0.7-1 
1b055a
6e06a8
6e06a8
%description csh
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
4fd2f7
This package provides scripts needed to run GROMACS with csh and a completion
4fd2f7
script.
6e06a8
6e06a8
%package tutor
6e06a8
Summary:	GROMACS tutorial files
6e06a8
Group:		Applications/Engineering
6e06a8
Requires:	gromacs-common = %{version}-%{release}
1b055a
BuildArch:	noarch
1b055a
# Due to switch to noarch package
7fad78
Obsoletes:	gromacs-tutor < 4.0.7-1 
6e06a8
6e06a8
%description tutor
4fd2f7
GROMACS is a versatile and extremely well optimized package to perform
4fd2f7
molecular dynamics computer simulations and subsequent trajectory analysis.
4fd2f7
It is developed for biomolecules like proteins, but the extremely high
4fd2f7
performance means it is used also in several other field like polymer chemistry
4fd2f7
and solid state physics.
6e06a8
6e06a8
This package provides tutorials for the use of GROMACS.
6e06a8
6e06a8
%prep
939be9
%setup -q 
4fd2f7
%patch0 -p1 -b .gmxrc
4fd2f7
%patch1 -p1 -b .gmxdemo
6e06a8
6e06a8
# Fix incorrect permission
4fd2f7
#chmod a-x src/tools/gmx_xpm2ps.c
6e06a8
6e06a8
6e06a8
6e06a8
%build
939be9
# First, override bug in MPICH2 packaging.
939be9
%{_mpich2_unload}
939be9
6e06a8
# Assembly kernels haven't got .note.GNU-stack sections
6e06a8
# because of incompatibilies with Microsoft Assembler.
6e06a8
# Add noexecstack to compiler flags
6e06a8
a90b74
export CFLAGS="%optflags -Wa,--noexecstack -fPIC"
939be9
export LIBS="-L%{_libdir}/atlas -lblas -llapack"
6e06a8
4fd2f7
# Default options, used for all compilations
dd1e26
export DEFOPTS="-D BUILD_SHARED_LIBS=ON -DCMAKE_SKIP_RPATH:BOOL=ON -DCMAKE_SKIP_BUILD_RPATH:BOOL=ON -DLIB=%{_lib}"
939be9
export SINGLE="-D GMX_DOUBLE=OFF" # Single precision
939be9
export DOUBLE="-D GMX_DOUBLE=ON" # Double precision
939be9
export MPI="-D GMX_MPI=ON"
1b055a
1b055a
# Add this to the configure options if you want to build a debug version
939be9
export NOASM="-D GMX_ACCELERATION=OFF"
4fd2f7
6e06a8
# Single precision
6e06a8
mkdir single
6e06a8
cd single
939be9
%cmake $DEFOPTS $SINGLE ..
939be9
make VERBOSE=1 %{?_smp_mflags}
6e06a8
cd ..
6e06a8
6e06a8
# Double precision
6e06a8
mkdir double
6e06a8
cd double
939be9
%cmake $DEFOPTS $DOUBLE ..
939be9
make VERBOSE=1 %{?_smp_mflags}
6e06a8
cd ..
6e06a8
6e06a8
1b055a
### MPI versions
1b055a
export CC=mpicc
1b055a
export CXX=mpicxx
1b055a
export F77=mpif77
1b055a
export F90=mpif90
1b055a
export FC=mpif90
6e06a8
1b055a
## Open MPI
dd1e26
%if %{with_openmpi}
1b055a
%{_openmpi_load}
939be9
# Suffix to be used for single precision is
939be9
SUFFIXCONF="-D GMX_DEFAULT_SUFFIX=OFF -D GMX_BINARY_SUFFIX=$SUFFIX -D GMX_LIBS_SUFFIX=${MPI_SUFFIX}"
1b055a
# single precision
1b055a
mkdir openmpi-single
1b055a
cd openmpi-single
939be9
%cmake $DEFOPTS $SINGLE $MPI $SUFFIXCONF ..
939be9
make VERBOSE=1 %{?_smp_mflags} mdrun
4fd2f7
cd ..
939be9
1b055a
# double precision
939be9
# Suffix to be used for double precision is
939be9
SUFFIXCONF="-D GMX_DEFAULT_SUFFIX=OFF -D GMX_BINARY_SUFFIX=$SUFFIX -D GMX_LIBS_SUFFIX=${MPI_SUFFIX}_d"
1b055a
mkdir openmpi-double
1b055a
cd openmpi-double
939be9
%cmake $DEFOPTS $DOUBLE $MPI $SUFFIXCONF ..
939be9
make VERBOSE=1 %{?_smp_mflags} mdrun
6e06a8
cd ..
1b055a
# unload
1b055a
%{_openmpi_unload}
dd1e26
%endif
1b055a
939be9
1b055a
## MPICH2
e3131b
%{_mpich2_load}
939be9
# Suffix to be used for single precision is
939be9
SUFFIXCONF="-D GMX_DEFAULT_SUFFIX=OFF -D GMX_BINARY_SUFFIX=$SUFFIX -D GMX_LIBS_SUFFIX=${MPI_SUFFIX}"
939be9
# MPICH 2 is broken, so need to modify linker command
939be9
export CC="mpicc -lstdc++"
1b055a
# single precision
e3131b
mkdir mpich2-single
e3131b
cd mpich2-single
939be9
%cmake $DEFOPTS $SINGLE $MPI $SUFFIXCONF ..
939be9
make VERBOSE=1 %{?_smp_mflags} mdrun
e3131b
cd ..
1b055a
# double precision
939be9
# Suffix to be used for double precision is
939be9
SUFFIXCONF="-D GMX_DEFAULT_SUFFIX=OFF -D GMX_BINARY_SUFFIX=$SUFFIX -D GMX_LIBS_SUFFIX=${MPI_SUFFIX}_d"
e3131b
mkdir mpich2-double
e3131b
cd mpich2-double
939be9
%cmake $DEFOPTS $DOUBLE $MPI $SUFFIXCONF ..
939be9
make VERBOSE=1 %{?_smp_mflags} mdrun
e3131b
cd ..
e3131b
%{_mpich2_unload}
6e06a8
4fd2f7
1b055a
%install
1b055a
rm -rf %{buildroot}
4fd2f7
4fd2f7
1b055a
## Open MPI
dd1e26
%if %{with_openmpi}
1b055a
%{_openmpi_load}
939be9
# Make install-mdrun target is broken, do install manually
939be9
mkdir -p %{buildroot}%{_libdir}/openmpi/{bin,lib}
1b055a
# single precision
1b055a
cd openmpi-single
939be9
install -p -m 755 src/kernel/mdrun %{buildroot}%{_libdir}/openmpi/bin/g_mdrun_openmpi
939be9
cp -a src/*/*.so* %{buildroot}%{_libdir}/openmpi/lib/
4fd2f7
cd ..
1b055a
# double precision
1b055a
cd openmpi-double
939be9
install -p -m 755 src/kernel/mdrun %{buildroot}%{_libdir}/openmpi/bin/g_mdrun_openmpi_d
939be9
cp -a src/*/*.so* %{buildroot}%{_libdir}/openmpi/lib/
6e06a8
cd ..
1b055a
%{_openmpi_unload}
dd1e26
%endif
6e06a8
1b055a
## MPICH 2
e3131b
%{_mpich2_load}
939be9
# Make install-mdrun target is broken, do install manually
939be9
mkdir -p %{buildroot}%{_libdir}/mpich2/{bin,lib}
1b055a
# single precision
e3131b
cd mpich2-single
939be9
install -p -m 755 src/kernel/mdrun %{buildroot}%{_libdir}/mpich2/bin/g_mdrun_mpich2
939be9
cp -a src/*/*.so* %{buildroot}%{_libdir}/mpich2/lib/
e3131b
cd ..
1b055a
# double precision
e3131b
cd mpich2-double
939be9
install -p -m 755 src/kernel/mdrun %{buildroot}%{_libdir}/mpich2/bin/g_mdrun_mpich2_d
939be9
cp -a src/*/*.so* %{buildroot}%{_libdir}/mpich2/lib/
e3131b
cd ..
e3131b
%{_mpich2_unload}
6e06a8
26363c
1b055a
## Serial versions
26363c
6e06a8
# Single precision
6e06a8
cd single
6e06a8
make DESTDIR=%{buildroot} INSTALL="install -p" install
6e06a8
cd ..
6e06a8
# Double precision
6e06a8
cd double
6e06a8
make DESTDIR=%{buildroot} INSTALL="install -p" install
6e06a8
cd ..
6e06a8
939be9
## Now, the rest of the necessary stuff
939be9
939be9
# Fix location of libraries
0c11ab
%ifarch x86_64 sparc64
939be9
mv %{buildroot}/usr/lib/*.so* %{buildroot}%{_libdir}/
939be9
# and pkgconfig files
939be9
mkdir -p %{buildroot}%{_libdir}/pkgconfig/
939be9
mv %{buildroot}/usr/lib/pkgconfig/* %{buildroot}%{_libdir}/pkgconfig/
0c11ab
%endif
4fd2f7
6e06a8
# Install manual & packager's note
6e06a8
install -cpm 644 %{SOURCE1} .
6e06a8
install -cpm 644 %{SOURCE6} README.fedora
6e06a8
6e06a8
# Remove broken makefiles generated by build process
6e06a8
rm -rf %{buildroot}%{_datadir}/%{name}/template/Makefil*
6e06a8
# Install template makefiles
6e06a8
install -cpm 644 %{SOURCE2} %{buildroot}%{_datadir}/%{name}/template/Makefile.single
6e06a8
install -cpm 644 %{SOURCE3} %{buildroot}%{_datadir}/%{name}/template/Makefile.double
6e06a8
install -cpm 644 %{SOURCE4} %{buildroot}%{_datadir}/%{name}/template/Makefile.mpi.single
6e06a8
install -cpm 644 %{SOURCE5} %{buildroot}%{_datadir}/%{name}/template/Makefile.mpi.double
6e06a8
6e06a8
# Fix GMXRC file permissions
6e06a8
chmod a+x %{buildroot}%{_bindir}/GMXRC %{buildroot}%{_bindir}/GMXRC.*
6e06a8
6e06a8
# Rename binaries and man pages to prevent clashes
6e06a8
# (This is done here so that we don't need to mess with machine generated makefiles.
939be9
#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 
939be9
for bin in do_dssp editconf eneconv genbox genconf genion genrestr gmxcheck gmxdump grompp make_edi make_ndx mdrun mk_angndx pdb2gmx tpbconv trjcat trjconv trjorder xpm2ps; do
6e06a8
mv %{buildroot}%{_bindir}/${bin} %{buildroot}%{_bindir}/g_${bin}
6e06a8
mv %{buildroot}%{_bindir}/${bin}_d %{buildroot}%{_bindir}/g_${bin}_d
6e06a8
done
6e06a8
6e06a8
for bin in demux.pl xplor2gmx.pl; do
6e06a8
mv %{buildroot}%{_bindir}/$bin %{buildroot}%{_bindir}/g_${bin}
6e06a8
done
6e06a8
6e06a8
# Man pages
939be9
#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 
939be9
for bin in do_dssp editconf eneconv genbox genconf genion genrestr gmxcheck gmxdump grompp make_edi make_ndx mdrun mk_angndx pdb2gmx tpbconv trjcat trjconv trjorder xpm2ps; do
6e06a8
mv %{buildroot}%{_mandir}/man1/${bin}.1 %{buildroot}%{_mandir}/man1/g_${bin}.1
939be9
#mv %{buildroot}%{_mandir}/man1/${bin}_d.1 %{buildroot}%{_mandir}/man1/g_${bin}_d.1
6e06a8
done
6e06a8
6e06a8
# Move completion files around
6e06a8
chmod a-x %{buildroot}%{_bindir}/completion.*
6e06a8
# Zsh
6e06a8
mkdir -p %{buildroot}%{_datadir}/zsh/site-functions
6e06a8
mv %{buildroot}%{_bindir}/completion.zsh %{buildroot}%{_datadir}/zsh/site-functions/gromacs
6e06a8
# Bash
6e06a8
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d
6e06a8
mv %{buildroot}%{_bindir}/completion.bash %{buildroot}/etc/bash_completion.d/gromacs
6e06a8
# Tcsh
6e06a8
mv %{buildroot}%{_bindir}/completion.csh . 
6e06a8
6e06a8
# Remove .la files
1b055a
find %{buildroot} -name *.la -exec rm -rf {} \;
4fd2f7
1b055a
# Post install for libs. MPI packages don't need this.
3de319
%post libs -p /sbin/ldconfig
4fd2f7
3de319
%postun libs -p /sbin/ldconfig
6e06a8
6e06a8
%clean
6e06a8
rm -rf %{buildroot}
6e06a8
6e06a8
6e06a8
# Files section
6e06a8
6e06a8
%files
6e06a8
%defattr(-,root,root,-)
8cb218
%{_bindir}/g_*
6e06a8
6e06a8
%files common
6e06a8
%defattr(-,root,root,-)
939be9
%doc AUTHORS COPYING README manual-4.5.pdf README.fedora
6e06a8
%{_bindir}/GMXRC
6e06a8
%{_bindir}/GMXRC.bash
6e06a8
%{_mandir}/man1/*
939be9
%{_mandir}/man7/gromacs.*
8b25f6
%{_datadir}/%{name}/
8b25f6
%exclude %{_datadir}/%{name}/template/
8b25f6
%exclude %{_datadir}/%{name}/tutor/
6e06a8
7fad78
%files libs
7fad78
%defattr(-,root,root,-)
7fad78
%{_libdir}/libgmx.so.*
7fad78
%{_libdir}/libgmx_d.so.*
7fad78
%{_libdir}/libgmxana.so.*
7fad78
%{_libdir}/libgmxana_d.so.*
7fad78
%{_libdir}/libgmxpreprocess.so.*
7fad78
%{_libdir}/libgmxpreprocess_d.so.*
7fad78
%{_libdir}/libmd.so.*
7fad78
%{_libdir}/libmd_d.so.*
7fad78
6e06a8
%files devel
6e06a8
%defattr(-,root,root,-)
6e06a8
%{_includedir}/%{name}
6e06a8
%{_libdir}/libgmx.so
6e06a8
%{_libdir}/libgmx_d.so
6e06a8
%{_libdir}/libgmxana.so
6e06a8
%{_libdir}/libgmxana_d.so
939be9
%{_libdir}/libgmxpreprocess.so
939be9
%{_libdir}/libgmxpreprocess_d.so
6e06a8
%{_libdir}/libmd.so
6e06a8
%{_libdir}/libmd_d.so
939be9
%{_libdir}/pkgconfig/*.pc
8b25f6
%{_datadir}/%{name}/template/
6e06a8
%exclude %{_datadir}/%{name}/template/Makefile.mpi.*
6e06a8
dd1e26
%if %{with_openmpi}
1b055a
%files openmpi
6e06a8
%defattr(-,root,root,-)
1b055a
%{_libdir}/openmpi/bin/g_mdrun*
7fad78
7fad78
%files openmpi-libs
7fad78
%defattr(-,root,root,-)
1b055a
%{_libdir}/openmpi/lib/lib*.so.*
6e06a8
1b055a
%files openmpi-devel
4fd2f7
%defattr(-,root,root,-)
1b055a
%{_libdir}/openmpi/lib/lib*.so
dd1e26
%endif
4fd2f7
e3131b
%files mpich2
e3131b
%defattr(-,root,root,-)
e3131b
%{_libdir}/mpich2/bin/g_mdrun*
7fad78
7fad78
%files mpich2-libs
7fad78
%defattr(-,root,root,-)
e3131b
%{_libdir}/mpich2/lib/lib*.so.*
1b055a
e3131b
%files mpich2-devel
e3131b
%defattr(-,root,root,-)
e3131b
%{_libdir}/mpich2/lib/lib*.so
6e06a8
6e06a8
%files zsh
6e06a8
%defattr(-,root,root,-)
6e06a8
%{_datadir}/zsh/site-functions/gromacs
6e06a8
%{_bindir}/GMXRC.zsh
6e06a8
6e06a8
%files bash
6e06a8
%defattr(-,root,root,-)
6e06a8
%config(noreplace) %{_sysconfdir}/bash_completion.d/gromacs
6e06a8
6e06a8
%files csh
6e06a8
%defattr(-,root,root,-)
6e06a8
%doc completion.csh
6e06a8
%{_bindir}/GMXRC.csh
6e06a8
6e06a8
%files tutor
6e06a8
%defattr(-,root,root,-)
8b25f6
%{_datadir}/%{name}/tutor/
6e06a8
6e06a8
6e06a8
%changelog
afadb8
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5.3-4
afadb8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
afadb8
dd1e26
* Mon Feb 07 2011 Dan Horák <dan[at]danny.cz> - 4.5.3-3
dd1e26
- conditionalize OpenMPI support
dd1e26
- fix build on 64-bit platforms
dd1e26
9c3bc4
* Mon Dec 20 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.3-2
9c3bc4
- Fix rest of BZ #649338.
9c3bc4
fead7d
* Thu Nov 18 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.3-1
fead7d
- Update to 4.5.3.
fead7d
f35182
* Fri Nov 05 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.2-3
f35182
- Rebuild due to libxml2 soname bump.
f35182
b830fd
* Wed Nov 03 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.2-2
b830fd
- Make gromacs package obsolete older versions of gromacs package due to the
b830fd
  branching of libraries.
b830fd
3de319
* Mon Nov 01 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.2-1
3de319
- Update to 4.5.2.
3de319
7fad78
* Wed Oct 27 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.1-2
7fad78
- Patch around #644950.
7fad78
- Split libraries in own packages to avoid multilib problems.
7fad78
939be9
* Sat Oct 09 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.5.1-1
939be9
- Update to 4.5.1.
939be9
3c91c4
* Sun Dec 06 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.0.7-1
3c91c4
- Update to 4.0.7.
3c91c4
cc7c0b
* Sun Dec 06 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.0.6-1
cc7c0b
- Update to 4.0.6.
cc7c0b
8cb218
* Fri Dec 04 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.0.5-6
8cb218
- Fix file conflict.
8cb218
031fca
* Tue Dec 01 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.0.5-5
031fca
- Put correct MPI devel package requires in place.
031fca
c315d5
* Tue Dec 01 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.0.5-4
c315d5
- Fix obsoletes.
c315d5
1b055a
* Mon Nov 30 2009 Jussi Lehtola <jussilehtola@fedoraproject.org> - 4.0.5-3
1b055a
- Combine libs with binaries and drop debug packages to avoid explosion of
1b055a
  number of packages.
e3131b
- Adopt use of MPI guidelines.
1b055a
0b7b88
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.5-2
0b7b88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
0b7b88
4fd2f7
* Fri May 22 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.5-1
4fd2f7
- Update to 4.0.5.
4fd2f7
- Change spec %%defines to %%globals.
4fd2f7
- Add debug subpackages to make debugging of GROMACS possible.
35dce5
ed60a6
* Tue Feb 17 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.4-1
ed60a6
- Update to 4.0.4.
ed60a6
0ff216
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-4
0ff216
- Retry fixing gmxdemo.
0ff216
2d0f49
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-3
2d0f49
- Fixed gmxdemo.
2d0f49
26363c
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-2
26363c
- Fix EPEL 4 build.
26363c
7b3f14
* Mon Jan 19 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.3-1
7b3f14
- Update to 4.0.3.
7b3f14
ad6f15
* Wed Jan 14 2009 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.2-7
ad6f15
- Update manual to latest version.
ad6f15
- Removed Requires: blas and lapack.
ad6f15
ad6f15
* Mon Nov 10 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.2-6
bb4bd8
- Update to 4.0.2.
bb4bd8
ad6f15
* Sun Nov 09 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.1-5
3f6f44
- Add Requires: blas too.
3f6f44
ad6f15
* Sun Nov 09 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0.1-4
a90b74
- Update to 4.0.1.
a90b74
- Add Requires: lapack and openmpi to prevent yum from pulling atlas and lam
a90b74
instead.
a90b74
ad6f15
* Wed Oct 15 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-3
6e06a8
- Rename also man pages.
6e06a8
ad6f15
* Mon Oct 13 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-2
6e06a8
- Added noreplace to bash completion file.
6e06a8
- Changed double precision mpi binary suffix to _mpi_d.
6e06a8
ad6f15
* Sun Oct 12 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-1
6e06a8
- Update to Gromacs 4.0.
6e06a8
- Remove module system and patch file names to begin with g_.
6e06a8
ad6f15
* Wed Oct 08 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.15.rc3
6e06a8
- Changed location of binaries.
6e06a8
- Removed conflict of module file, as the program is binary compatible with older versions.
6e06a8
ad6f15
* Wed Oct 08 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.14.rc3
6e06a8
- The gromacs module is loaded automatically and it conflicts with gromacs3.
6e06a8
ad6f15
* Tue Oct 07 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.13.rc3
6e06a8
- Renamed module files from %%{name}-%%{version} to %%{name}.
6e06a8
ad6f15
* Mon Oct 06 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.12.rc3
6e06a8
- Fix BR to get GROMACS to build in mock for epel-4.
6e06a8
ad6f15
* Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.11.rc3
6e06a8
- Fix to get GROMACS to build in mock for epel-5.
6e06a8
ad6f15
* Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.10.rc3
6e06a8
- Implement module system & remove binary renaming.
6e06a8
- No need for autoreconf anymore.
6e06a8
- Update to rc3.
6e06a8
ad6f15
* Sat Oct 04 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.9.rc2
6e06a8
- Fall back to autoreconf due to binary renaming.
6e06a8
ad6f15
* Fri Oct 03 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.8.rc2
6e06a8
- Modified install commands to preserve timestamps.
6e06a8
ad6f15
* Fri Oct 03 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.7.rc2
6e06a8
- Even more review fixes.
6e06a8
- Binaries renamed:
6e06a8
	highway	->	g_highway
6e06a8
	luck	->	g_luck
6e06a8
	sigeps	->	g_sigeps
6e06a8
	wheel	->	g_wheel
6e06a8
ad6f15
* Thu Oct 02 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.6.rc2
6e06a8
- Final review fixes.
6e06a8
ad6f15
* Wed Oct 01 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.5.rc2
6e06a8
- Strip down requires by branching tutor to its own package.
6e06a8
ad6f15
* Tue Sep 30 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.4.rc2
6e06a8
- Extensive package review fixes.
6e06a8
- Unclear licenses on some files, filed upstream bug 217.
6e06a8
  http://bugzilla.gromacs.org/show_bug.cgi?id=217
6e06a8
ad6f15
* Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.3.rc2
6e06a8
- Move .so files to -devel package.
6e06a8
- Remove .la files.
6e06a8
ad6f15
* Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.2.rc2
6e06a8
- Implement out-of-tree-builds.
6e06a8
- Add --noexecstack to CFLAGS.
6e06a8
- Remove execstack procedure and prelink from buildreqs.
6e06a8
- Filed upstream bug 215 to add .note.GNU-stack .
6e06a8
- Fix incorrect file permission on src/tools/gmx_xpm2ps.c .
6e06a8
ad6f15
* Mon Sep 29 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.1.rc2
6e06a8
- Alphabetized buildrequires.
6e06a8
- Changed gromacs-share to gromacs-common.
6e06a8
ad6f15
* Fri Sep 26 2008 Jussi Lehtola <jussi.lehtola@iki.fi> - 4.0-0.0.rc2
6e06a8
- Initial build.