summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD91
2 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3f56874c593a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = gromacs
+ 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.0.5
+ pkgrel = 1
+ url = http://www.gromacs.org/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = cmake
+ depends = fftw
+ depends = lesstif
+ depends = perl
+ depends = libxml2
+ depends = libsm
+ depends = libx11
+ options = !libtool
+ source = ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.0.5.tar.gz
+ sha1sums = 990a93d62964eb80d310e713790795a36681eacf
+
+pkgname = gromacs
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8ec889b356ff
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,91 @@
+# $Id: PKGBUILD 57440 2011-10-27 20:16:15Z lcarlier $
+# Maintainer: Hector <hsearaDOTatDOTgmailDOTcom>
+# Contributor: Eduardo Martins Lopes "duca" <edumlopes@gmail.com>
+# Contributor: Abhishek Dasgupta <abhidg@gmail.com>
+# Contributor: Ricardo <rikardo.horo@gmail.com>
+
+pkgname=gromacs
+pkgver=5.0.5
+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=("GPL")
+arch=('i686' 'x86_64')
+depends=('fftw' 'lesstif' 'perl' 'libxml2' 'libsm' 'libx11')
+makedepends=('cmake')
+options=('!libtool')
+source=(ftp://ftp.gromacs.org/pub/gromacs/${pkgname}-${pkgver}.tar.gz)
+sha1sums=('990a93d62964eb80d310e713790795a36681eacf')
+
+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 ../${pkgname}-${pkgver}/ \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_SHARED_LIBS=ON \
+ -DGMX_X11=ON \
+ -DGMX_OPENMP=ON \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DGMX_DOUBLE=ON \
+ -DGMX_SIMD=AVX_256 \
+ -DREGRESSIONTEST_DOWNLOAD=ON \
+ -DGMX_LIBS_SUFFIX=_d
+ make
+
+ msg2 "Building the single precision files"
+ cd ${srcdir}/single
+ cmake ../${pkgname}-${pkgver}/ \
+ -DCMAKE_INSTALL_PREFIX=/usr/ \
+ -DBUILD_SHARED_LIBS=ON \
+ -DGMX_X11=ON \
+ -DGMX_OPENMP=ON \
+ -DGMX_SIMD=AVX_256 \
+ -DREGRESSIONTEST_DOWNLOAD=ON \
+ -DCMAKE_INSTALL_LIBDIR=lib
+ make
+}
+
+check () {
+ ########################################
+ # Currently tests fail. This is the #
+ # reason they are commented out. #
+ # Still no problems detected so far. #
+ ########################################
+ msg2 "Testing double precision compilation"
+ cd ${srcdir}/double
+# make test
+ msg2 "Testing single precision compilation"
+ cd ${srcdir}/single
+# make test
+}
+
+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
+
+ # installing completions in correct location and environment setup script
+ msg2 "Installing completion and environment setup script"
+ mkdir -p ${pkgdir}/etc/profile.d/
+ mkdir -p ${pkgdir}/usr/share/bash-completion/completions
+ install -D -m755 ${srcdir}/${pkgname}-${pkgver}/src/programs/completion/gmx-completion.bash "${pkgdir}/usr/share/bash-completion/completions/gromacs"
+ mv ${pkgdir}/usr/bin/GMXRC.* ${pkgdir}/etc/profile.d/
+ sed "s:/usr/bin:/etc/profile.d:" ${pkgdir}/usr/bin/GMXRC > ${pkgdir}/etc/profile.d/GMXRC
+ chmod 755 ${pkgdir}/etc/profile.d/GMXRC
+ rm -f ${pkgdir}/usr/bin/completion.*
+ rm -f ${pkgdir}/usr/bin/GMXRC
+}