File gromacs.spec of Package gromacs
#
# spec file for package gromacs
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: gromacs
Version: 4.6.1
Release: 0
%define srcversion 4.6.1
Summary: Molecular Dynamics Package
License: GPL-2.0+
Group: Productivity/Scientific/Chemistry
Url: http://www.gromacs.org
Source0: gromacs-%{srcversion}.tar.bz2
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
BuildRequires: libstdc++-devel
BuildRequires: libxml2-devel
BuildRequires: xorg-x11-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory
analysis. It is developed for biomolecules like proteins, but the
extremely high performance means it is used also in several other field
like polymer chemistry and solid state physics. This version has the
dynamic libs and executables; to hack new utility programs you also
need the headers and static libs in gromacs-dev. Linux kernel 2.4 or
later is STRONGLY recommended on Pentium III and later processors since
GROMACS then can use assembly loops with SSE instructions.
%package devel
Summary: Molecular dynamics package
Group: Productivity/Scientific/Chemistry
Requires: %{name} = %{version}
Requires: fftw3-devel
Requires: glibc-devel
Requires: xorg-x11-devel
%description devel
GROMACS is a versatile and extremely well optimized package to perform
molecular dynamics computer simulations and subsequent trajectory
analysis. It is developed for biomolecules like proteins, but the
extremely high performance means it is used also in several other field
like polymer chemistry and solid state physics. This version has the
dynamic libs and executables; to hack new utility programs you also
need the headers and static libs in gromacs-dev. Linux kernel 2.4 or
later is STRONGLY recommended on Pentium III and later processors since
GROMACS then can use assembly loops with SSE instructions.
%prep
%setup -q -n %{name}-%{srcversion}
%build
%if 0%{?fedora}
export RPM_OPT_FLAGS="%{optflags} -DFEDORA"
%endif
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_FLAGS_RELEASE:STRING="%{optflags} -fno-strict-aliasing" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="%{optflags}" \
-DCMAKE_SKIP_RPATH=1 \
-DPACKAGE_ARCHITECTURE=uname -m \
-DLIB=%{_lib} \
-DGMXLIB=%{_lib} \
..
make
%install
cd build
%makeinstall
rm -f %{buildroot}%{_libdir}/*.la
%fdupes %{buildroot}/usr/share/gromacs
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/gromacs/
%exclude %{_datadir}/gromacs/template
%doc %{_datadir}/gromacs/html/
%{_libdir}/libgmx.so.*
%{_libdir}/libgmxana.so.*
%{_libdir}/libmd.so.*
%{_libdir}/libgmxpreprocess.so.*
%{_mandir}/man1/*
%{_mandir}/man7/*
%files devel
%defattr(644,root,root,755)
%{_datadir}/gromacs/template
%{_includedir}/gromacs/
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%changelog