summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHector Mtz-Seara2016-09-07 10:16:35 +0200
committerHector Mtz-Seara2016-09-07 10:16:35 +0200
commit185a83ef7d1fbe2c415379b33642093bfbb1bc1e (patch)
treefc7f34ac8464d8bf32edfa8002c923d0b82994da
downloadaur-185a83ef7d1fbe2c415379b33642093bfbb1bc1e.tar.gz
gromacs-5.1.3 Last version of the commonly used 5.1.x series
-rw-r--r--.SRCINFO24
-rw-r--r--GMXRC.bash.cmakein.patch14
-rw-r--r--PKGBUILD89
3 files changed, 127 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..b9f4bc97e95e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = gromacs-5.1-complete
+ pkgdesc = A versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.
+ pkgver = 5.1.3
+ pkgrel = 1
+ url = http://www.gromacs.org/
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = cmake
+ depends = gcc5
+ depends = fftw
+ depends = lesstif
+ depends = perl
+ depends = libxml2
+ depends = libsm
+ depends = libx11
+ options = !libtool
+ source = ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.1.3.tar.gz
+ source = GMXRC.bash.cmakein.patch
+ sha1sums = da1ff3124679e9f7175c7d1cbdc7b2ede0fc3ae0
+ sha1sums = 014b2cbfa13db9b495c88f653805c330747117dc
+
+pkgname = gromacs-5.1-complete
+
diff --git a/GMXRC.bash.cmakein.patch b/GMXRC.bash.cmakein.patch
new file mode 100644
index 000000000000..f0408d787a2e
--- /dev/null
+++ b/GMXRC.bash.cmakein.patch
@@ -0,0 +1,14 @@
+--- GMXRC.bash.cmakein 2013-11-08 13:09:33.000000000 +0200
++++ GMXRC.bash.cmakein.patch 2015-02-20 12:48:10.770670309 +0200
+@@ -4,6 +4,11 @@
+ # This is not 100% necessary, but very useful when we
+ # repeatedly switch between gmx versions in a shell.
+
++#Patch to avoid problems when gromacs is installed using /usr/ as root
++if [ "$GMXLDLIB" == "/usr/lib" ]; then export GMXLDLIB=""; fi
++if [ "$GMXBIN" == "/usr/bin" ]; then export GMXBIN=""; fi
++if [ "$GMXMAN" == "/usr/share/man" ]; then export GMXMAN=""; fi
++
+ # First remove gromacs part of ld_library_path
+ tmppath=""
+ for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..231d90d03358
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,89 @@
+# Maintainer: Hector <hsearaDOTatDOTgmailDOTcom>
+
+pkgname=gromacs-5.1-complete
+pkgver=5.1.3
+pkgrel=1
+pkgdesc='A versatile package to perform molecular dynamics, i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.'
+url='http://www.gromacs.org/'
+license=("LGPL")
+arch=('i686' 'x86_64')
+depends=('gcc5' 'fftw' 'lesstif' 'perl' 'libxml2' 'libsm' 'libx11')
+makedepends=('cmake')
+options=('!libtool')
+source=(ftp://ftp.gromacs.org/pub/gromacs/gromacs-${pkgver}.tar.gz
+ GMXRC.bash.cmakein.patch)
+sha1sums=('da1ff3124679e9f7175c7d1cbdc7b2ede0fc3ae0'
+ '014b2cbfa13db9b495c88f653805c330747117dc')
+
+export VMDDIR=/usr/lib/vmd/ #If vmd is available at compilation time
+ #Gromacs will have the ability to read any
+ #trajectory file format that can be read by
+ #VMD installation (e.g. AMBER's DCD format).
+
+#With gcc5 currently there are less errors in the tests
+# also the compilation is possible in cuda capable machines
+export CC=gcc-5
+export CXX=g++-5
+
+prepare() {
+cd ${srcdir}/gromacs-${pkgver}/scripts/
+ls
+patch -p0 -i ${srcdir}/GMXRC.bash.cmakein.patch
+}
+
+
+build() {
+ mkdir -p ${srcdir}/{single,double}
+
+ ###### CMAKE OPTIONS DISABLE BY DEFAULT ###########
+ # If you are using a haswell CPU, you will have #
+ # problems compiling with AVX2 support unless you #
+ # modify march=native in the /etc/makepkg.conf: #
+ # https://wiki.archlinux.org/index.php/Makepkg#Architecture.2C_compile_flagsAdd #
+ ###################################################
+ msg2 "Building the double precision files"
+ cd ${srcdir}/double
+ cmake ../gromacs-${pkgver}/ \
+ -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs/gromacs-${pkgver}/ \
+ -DBUILD_SHARED_LIBS=ON \
+ -DGMX_X11=ON \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DGMX_DOUBLE=ON \
+ -DREGRESSIONTEST_DOWNLOAD=ON \
+ -DGMX_BUILD_OWN_FFTW=ON \
+ -DGMX_LIBS_SUFFIX=_d
+ make
+
+ msg2 "Building the single precision files"
+ cd ${srcdir}/single
+ cmake ../gromacs-${pkgver}/ \
+ -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs/gromacs-${pkgver}/ \
+ -DBUILD_SHARED_LIBS=ON \
+ -DGMX_X11=ON \
+ -DREGRESSIONTEST_DOWNLOAD=ON \
+ -DGMX_BUILD_OWN_FFTW=ON \
+ -DCMAKE_INSTALL_LIBDIR=lib
+ make
+}
+
+check () {
+ msg2 "Testing double precision compilation"
+ cd ${srcdir}/double
+ make check
+ msg2 "Testing single precision compilation"
+ cd ${srcdir}/single
+ make check
+}
+
+package() {
+
+ msg2 "Making the single precision executables"
+ cd ${srcdir}/single
+ make DESTDIR=${pkgdir} install
+
+ # Cleaning up, kept the csh completion at default location
+ msg2 "Making the double precision executables"
+ cd ${srcdir}/double
+ make DESTDIR=${pkgdir} install
+
+}