File gromacs.spec of Package gromacs

#
# spec file for package gromacs (Version 4.5.3)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           gromacs
BuildRequires:  cmake fftw3-devel libxml2-devel xorg-x11-devel
BuildRequires:  gcc-c++ libstdc++-devel
%if 0%{?suse_version} > 1010
BuildRequires:  fdupes
%endif

Version:        4.5.3
Release:        1
Summary:        Molecular Dynamics Package
Url:            http://www.gromacs.org
License:        GPLv2+
Group:          Productivity/Scientific/Chemistry
AutoReqProv:    on
Source0:        gromacs-%{version}.tar.bz2
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.



Authors:
--------
    David van der Spoel <spoel@gromacs.org>
    Berk Hess <hess@gromacs.org>
    Erik Lindahl <lindahl@gromacs.org>

%package devel
License:        GPLv2+
Summary:        Molecular dynamics package
Group:          Productivity/Scientific/Chemistry
Requires:       %{name} = %{version} fftw3-devel glibc-devel 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.



Authors:
--------
    David van der Spoel <spoel@gromacs.org>
    Berk Hess <hess@gromacs.org>
    Erik Lindahl <lindahl@gromacs.org>

%prep
%setup -q

%build
%if 0%{?fedora}
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DFEDORA"
%endif
mkdir build
cd build
cmake \
  -DCMAKE_INSTALL_PREFIX=/usr \
  -DCMAKE_VERBOSE_MAKEFILE=TRUE \
  -DCMAKE_BUILD_TYPE=Release \
  -DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS -fno-strict-aliasing" \
  -DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
  -DCMAKE_SKIP_RPATH=1 \
  -DPACKAGE_ARCHITECTURE=uname -m \
  -DLIB=%{_lib} \
  ..

make

%install
cd build
make DESTDIR=${RPM_BUILD_ROOT} install
%{__rm} -f %{buildroot}%{_libdir}/*.la
%if 0%{?suse_version} > 1010
%fdupes %{buildroot}/usr/share/gromacs
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_bindir}/*
%dir %{_datadir}/gromacs
%{_datadir}/gromacs/top
%{_datadir}/gromacs/tutor
%docdir %{_datadir}/gromacs/html
%{_datadir}/gromacs/html/
%{_mandir}/man1/*
%{_mandir}/man7/*
%{_libdir}/libgmx.so.*
%{_libdir}/libgmxana.so.*
%{_libdir}/libmd.so.*
%{_libdir}/libgmxpreprocess.so.*

%files devel
%defattr(644,root,root,755)
%{_datadir}/gromacs/template
%{_libdir}/*.so
%dir %{_includedir}/gromacs
%{_includedir}/gromacs/*
%{_libdir}/pkgconfig/*

%changelog
openSUSE Build Service is sponsored by