File espresso.spec of Package espresso

#
# espresso.spec
#
# Copyright (c) 2014 Christoph Junghans
#
# Licensed under the Apache Software License (ASL 2.0)
#


Name:       espresso
Version:    3.3.0
Release:    0
Summary:    Parallel simulation software for soft matter research
Group:      Productivity/Scientific/Chemistry
License:    GPL-3.0
URL:        http://espressomd.org/
Source:     http://download.savannah.gnu.org/releases/espressomd/%{name}-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  gcc-c++
BuildRequires:  openmpi-devel
BuildRequires:  fftw3-devel
BuildRequires:  tcl-devel
BuildRequires:  fdupes
BuildRequires:  python-devel
Requires:       %{name}-common

%description
ESPResSo is a highly versatile software package for performing and analyzing
scientific Molecular Dynamics many-particle simulations of coarse-grained
atomistic or bead-spring models as they are used in soft-matter research in
physics, chemistry and molecular biology. It can be used to simulate systems
such as polymers, liquid crystals, colloids, ferrofluids and biological
systems, for example DNA and lipid membranes.

%package openmpi
Summary:    Architecture independent data files for ESPResSo
Group:      Productivity/Scientific/Chemistry
Requires:   %{name}-common

%description openmpi
ESPResSo is a highly versatile software package for performing and analyzing
scientific Molecular Dynamics many-particle simulations of coarse-grained
atomistic or bead-spring models as they are used in soft-matter research in
physics, chemistry and molecular biology. It can be used to simulate systems
such as polymers, liquid crystals, colloids, ferrofluids and biological
systems, for example DNA and lipid membranes.

This package contains openmpi version of ESPResSo

%package common
Summary:    Architecture independent data files for ESPResSo
Group:      Productivity/Scientific/Chemistry
BuildArch:  noarch
Requires:   tcl

%description common
ESPResSo is a highly versatile software package for performing and analyzing
scientific Molecular Dynamics many-particle simulations of coarse-grained
atomistic or bead-spring models as they are used in soft-matter research in
physics, chemistry and molecular biology. It can be used to simulate systems
such as polymers, liquid crystals, colloids, ferrofluids and biological
systems, for example DNA and lipid membranes.

This package contains architecture independent data files for ESPResSo.

%package doc
Summary:    Architecture independent data files for ESPResSo
Group:      Productivity/Scientific/Chemistry
BuildArch:  noarch

%description doc
ESPResSo is a highly versatile software package for performing and analyzing
scientific Molecular Dynamics many-particle simulations of coarse-grained
atomistic or bead-spring models as they are used in soft-matter research in
physics, chemistry and molecular biology. It can be used to simulate systems
such as polymers, liquid crystals, colloids, ferrofluids and biological
systems, for example DNA and lipid membranes.

This package contains documentation for ESPResSo.

%prep
%setup -q

%build
# call ../configure instead of ./configure
%global ddconfigure %(printf %%s '%configure' | sed 's!\./configure!../configure!g')

mkdir nompi openmpi
cd nompi
%ddconfigure --without-mpi --without-python-interface
make %{?_smp_mflags}
cd ../openmpi
%if %{defined fedora}
%{_openmpi_load}
%endif
%ddconfigure --with-mpi --program-suffix="-openmpi" --without-python-interface
make %{?_smp_mflags}

%install
make -C nompi install DESTDIR=%{buildroot}
make -C openmpi install DESTDIR=%{buildroot}
%fdupes %{buildroot}%{_prefix}

%files
%defattr(-,root,root,-)
%{_bindir}/Espresso

%files openmpi
%defattr(-,root,root,-)
%{_bindir}/Espresso-openmpi

%files common
%defattr(-,root,root,-)
%{_datadir}/espresso
%doc README COPYING AUTHORS NEWS ChangeLog 

%files doc
%defattr(-,root,root,-)
%doc doc/ug/ug.pdf

%changelog
openSUSE Build Service is sponsored by