[espresso] initial import (#740846)

tomspur tomspur at fedoraproject.org
Thu Oct 27 13:12:24 UTC 2011


commit 8afca25e0170879055ac655f5abdd913c9dccb1c
Author: Thomas Spura <thomas.spura at gmail.com>
Date:   Thu Oct 27 15:12:00 2011 +0200

    initial import (#740846)

 .gitignore                 |    1 +
 espresso-install-fix.patch |   30 ++++++
 espresso.spec              |  237 ++++++++++++++++++++++++++++++++++++++++++++
 sources                    |    1 +
 4 files changed, 269 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7678328 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/espresso-3.0.2.tar.gz
diff --git a/espresso-install-fix.patch b/espresso-install-fix.patch
new file mode 100644
index 0000000..51560dd
--- /dev/null
+++ b/espresso-install-fix.patch
@@ -0,0 +1,30 @@
+commit cc30e3c19f92c93481e751ad1e669e342cacff22
+Author: Christoph Junghans <junghans at votca.org>
+Date:   Mon Sep 19 16:16:38 2011 +0200
+
+    fixed install issue related to name transformation
+
+diff --git a/Makefile.am b/Makefile.am
+index 988481b..1e64a09 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -40,14 +40,16 @@ Espresso_install_CPPFLAGS = -D 'ESPRESSO_SCRIPTS_DEFAULT="$(scriptsdir)"'
+ Espresso_install_SOURCES = src/scriptsdir.c src/main.c
+ Espresso_install_LDADD = src/libEspresso.a
+ 
++ESPRESSO = `echo Espresso | sed '$(transform)'`$(EXEEXT)
++ESPRESSO_INSTALL = `echo Espresso.install | sed '$(transform)'`$(EXEEXT)
+ # rename Espresso after installation
+ install-exec-hook:
+ 	$(am__mv) \
+-		$(DESTDIR)$(bindir)/Espresso.install \
+-		$(DESTDIR)$(bindir)/Espresso
++		$(DESTDIR)$(bindir)/$(ESPRESSO_INSTALL) \
++		$(DESTDIR)$(bindir)/$(ESPRESSO)
+ 
+ uninstall-local:
+-	-rm -f $(DESTDIR)$(bindir)/Espresso
++	-rm -f $(DESTDIR)$(bindir)/$(ESPRESSO)
+ 
+ 
+ #################################################################
diff --git a/espresso.spec b/espresso.spec
new file mode 100644
index 0000000..c104144
--- /dev/null
+++ b/espresso.spec
@@ -0,0 +1,237 @@
+%if 0%{?fedora} > 12 || 0%{?rhel} > 6
+%global with_python3 1
+%else
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%endif
+
+# Define a macro for calling ../configure instead of ./configure
+%global dconfigure %(printf %%s '%configure' | sed 's!\./configure!../configure!g')
+# transform proper bindir
+%global dconfigure_mpi %(printf %%s '%dconfigure' | sed 's!/usr/bin!$MPI_BIN!g')
+
+### TESTSUITE ###
+# The testsuite currently fails only on the buildsystem, but works localy.
+# So to easy enable/disable the testsuite, I introduce the following
+#   variables:
+#
+# * MPD:       if '1' enable mpich2, which requires mpd to start
+# * OPENMPI:   if '1' enable openmpi
+%global MPD 0
+%global OPENMPI 0
+
+Name:           espresso
+Version:        3.0.2
+Release:        2%{?dist}
+Summary:        Extensible Simulation Package for Research on Soft matter
+Group:          System Environment/Libraries
+
+License:        GPLv3+
+URL:            http://espressomd.org
+Source0:        http://download.savannah.gnu.org/releases/espressomd/espresso-%{version}.tar.gz
+# install fix cherry-picked from upstream git
+Patch0:         espresso-install-fix.patch
+# BR autotools for patch0
+BuildRequires:  autoconf
+BuildRequires:  automake
+
+BuildRequires:  tcl-devel
+BuildRequires:  tk-devel
+BuildRequires:  fftw-devel
+
+Requires:       %{name}-common = %{version}-%{release}
+
+# for the testsuite: 'pwgen' is needed to create a random password
+BuildRequires:  pwgen
+
+%description
+ESPResSo can perform Molecular Dynamics simulations of bead-spring models
+in various ensembles ((N,V,E), (N,V,T), and (N,p,T)).
+ESPResSo contains a number of advanced algorithms, e.g.
+    * DPD thermostat (for hydrodynamics)
+    * P3M, MMM2D, MMM1D, ELC for electrostatic interactions
+    * Lattice-Boltzmann for hydrodynamics 
+
+%package common
+Summary:        Common files for %{name} packages
+BuildArch:      noarch
+Requires:       %{name}-common = %{version}-%{release}
+%description common
+ESPResSo can perform Molecular Dynamics simulations of bead-spring models
+in various ensembles ((N,V,E), (N,V,T), and (N,p,T)).
+ESPResSo contains a number of advanced algorithms, e.g.
+    * DPD thermostat (for hydrodynamics)
+    * P3M, MMM2D, MMM1D, ELC for electrostatic interactions
+    * Lattice-Boltzmann for hydrodynamics 
+This package contains the license file and data files shard between the
+subpackages of %{name}.
+
+%package openmpi
+BuildRequires:  openmpi-devel
+Requires:       openmpi%{?_isa}
+Requires:       %{name}-common = %{version}-%{release}
+Summary:        Extensible Simulation Package for Research on Soft matter
+Group:          System Environment/Libraries 
+%description openmpi
+ESPResSo can perform Molecular Dynamics simulations of bead-spring models
+in various ensembles ((N,V,E), (N,V,T), and (N,p,T)).
+ESPResSo contains a number of advanced algorithms, e.g.
+    * DPD thermostat (for hydrodynamics)
+    * P3M, MMM2D, MMM1D, ELC for electrostatic interactions
+    * Lattice-Boltzmann for hydrodynamics 
+
+This package contains %{name} compiled against Open MPI.
+
+
+%package mpich2
+BuildRequires:  mpich2-devel
+Requires:       mpich2%{?_isa}
+Requires:       %{name}-common = %{version}-%{release}
+Summary:        Extensible Simulation Package for Research on Soft matter
+Group:          System Environment/Libraries 
+%description mpich2
+ESPResSo can perform Molecular Dynamics simulations of bead-spring models
+in various ensembles ((N,V,E), (N,V,T), and (N,p,T)).
+ESPResSo contains a number of advanced algorithms, e.g.
+    * DPD thermostat (for hydrodynamics)
+    * P3M, MMM2D, MMM1D, ELC for electrostatic interactions
+    * Lattice-Boltzmann for hydrodynamics 
+
+This package contains %{name} compiled against MPICH2.
+
+
+%prep
+%setup -q
+%patch0 -p1
+autoreconf -fi
+
+sed -i 's/tclsh8\.4/tclsh/' tools/trace_memory.tcl
+
+mkdir openmpi_build mpich2_build no_mpi
+
+
+%build
+pushd no_mpi
+export CC=gcc
+export CXX=g++
+%dconfigure --enable-shared --with-tk
+make %{?_smp_mflags}
+popd
+
+# Build parallel versions: set compiler variables to MPI wrappers
+export CC=mpicc
+export CXX=mpicxx
+
+# Build OpenMPI version
+%{_openmpi_load}
+pushd openmpi_build
+%dconfigure_mpi --enable-shared --with-tk --program-suffix=$MPI_SUFFIX
+make %{?_smp_mflags}
+popd
+%{_openmpi_unload}
+
+# Build mpich2 version
+%{_mpich2_load}
+pushd mpich2_build
+%dconfigure_mpi --enable-shared --with-tk --program-suffix=$MPI_SUFFIX
+make %{?_smp_mflags}
+popd
+%{_mpich2_unload}
+
+
+%install
+# first install mpi files and move around because MPI_SUFFIX above doesn't
+# work yet (will be fixed in a new version)
+%{_openmpi_load}
+pushd openmpi_build
+make install DESTDIR=%{buildroot}
+popd
+%{_openmpi_unload}
+
+%{_mpich2_load}
+pushd mpich2_build
+make install DESTDIR=%{buildroot}
+popd
+%{_mpich2_unload}
+
+
+pushd no_mpi
+make install DESTDIR=%{buildroot}
+popd
+
+rm %{buildroot}%{_libdir}/libespressobf.a
+
+chmod +x %{buildroot}/usr/share/espresso/tools/trace_memory.py
+chmod +x %{buildroot}/usr/share/espresso/tools/trace_memory.tcl
+chmod +x %{buildroot}/usr/share/espresso/tools/set_features
+
+
+%check
+pushd no_mpi
+make check || cat testsuite/*.err || :
+popd
+
+# test openmpi?
+%if 0%{?OPENMPI}
+%{_openmpi_load}
+pushd openmpi_build
+make check || cat testsuite/*.err || :
+popd
+%{_openmpi_unload}
+%endif
+
+# test mpd?
+%if 0%{?MPD}
+%{_mpich2_load}
+# create mpd.conf
+#export MPD_CONF_FILE=mpd.conf
+#echo MPD_SECRETWORD=$(pwgen -s 50 1) > mpd.conf
+#chmod 600 mpd.conf
+#mpd --daemon
+
+pushd mpich2_build
+make check || cat testsuite/*.err || :
+popd
+
+#mpdallexit
+
+# delete mpd.conf again
+#rm mpd.conf
+#unset MPD_CONF_FILE
+%{_mpich2_unload}
+%endif
+
+
+%files common
+%doc AUTHORS COPYING README NEWS ChangeLog doc/ug/ug.pdf
+%{_datadir}/espresso/
+
+%files
+%{_bindir}/Espresso
+
+%files openmpi
+%{_libdir}/openmpi/bin/Espresso_openmpi
+
+%files mpich2
+%{_libdir}/mpich2/bin/Espresso_mpich2
+
+
+%changelog
+* Wed Oct 26 2011 Thomas Spura <tomspur at fedoraproject.org> - 3.0.2-2
+- add missing BR autoconf/automake
+- use _isa where possible
+- use general tclsh shebang
+- build --with-tk
+
+* Thu Oct  6 2011 Thomas Spura <tomspur at fedoraproject.org> - 3.0.2-1
+- update to new version
+- introduce configure_mpi
+
+* Sun Sep 25 2011 Thomas Spura <tomspur at fedoraproject.org> - 3.0.1-3
+- use correct MPI_SUFFIX
+- don't install library as upstream doesn't support it anymore
+
+* Sun Sep 25 2011 Thomas Spura <tomspur at fedoraproject.org> - 3.0.1-2
+- correctly install into _libdir/openmpi and not _libdir/name-openmpi
+
+* Fri Sep 16 2011 Thomas Spura <tomspur at fedoraproject.org> - 3.0.1-1
+- initial packaging
diff --git a/sources b/sources
index e69de29..d70ea97 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f277a9adc6e16ca530f46dd74c3c5826  espresso-3.0.2.tar.gz


More information about the scm-commits mailing list