summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxpt2015-07-17 22:59:26 -0300
committerxpt2015-07-17 22:59:26 -0300
commit4b88dcd0fba12c228240577740230f6f7dc717a9 (patch)
tree33fc41b0f552aac9248023244247041b31452a39
downloadaur-4b88dcd0fba12c228240577740230f6f7dc717a9.tar.gz
Initial import
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD53
-rw-r--r--fftw3.patch11
-rw-r--r--usrlocal.patch10
4 files changed, 92 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..82422e47f65a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = liggghts
+ pkgdesc = Open Source Discrete Element Method Particle Simulation Software
+ pkgver = 3.2
+ pkgrel = 0
+ url = https://github.com/CFDEMproject/LIGGGHTS-PUBLIC
+ arch = any
+ license = GPL
+ depends = paraview
+ depends = openmpi
+ depends = voro++
+ depends = fftw
+ source = fftw3.patch
+ source = usrlocal.patch
+ md5sums = 20fb3f88185884af9f0e16477671ca8e
+ md5sums = ea4006138a0750ab6223678bb767ef0c
+
+pkgname = liggghts
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..395a5773169d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,53 @@
+# Maintainer: xpt <user.xpt@gmail.com>
+
+pkgname=liggghts
+pkgver=3.2
+pkgrel=0
+pkgdesc="Open Source Discrete Element Method Particle Simulation Software"
+arch=('any')
+url="https://github.com/CFDEMproject/LIGGGHTS-PUBLIC"
+license=('GPL')
+depends=('paraview' 'openmpi' 'voro++' 'fftw')
+source=('fftw3.patch' 'usrlocal.patch')
+md5sums=('20fb3f88185884af9f0e16477671ca8e' 'ea4006138a0750ab6223678bb767ef0c')
+
+_gitroot="https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git"
+_gitname="liggghts-public"
+
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $_gitroot $_gitname
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build/"
+
+ patch -Np0 < ../fftw3.patch
+ patch -Np0 < ../usrlocal.patch # diff -Naur Makefile.lammps.old Makefile.lammps > usrlocal.patch
+
+ cd src
+ make clean-all
+ make openmpi || return 1
+}
+
+ package() {
+ mkdir -p $pkgdir/usr/share/$pkgname
+ mkdir -p $pkgdir/usr/share/doc/$pkgname
+ cd $srcdir/$_gitname-build
+ install -Dm 755 src/lmp_openmpi $pkgdir/usr/bin/$pkgname
+ install -Dm644 examples/LIGGGHTS/Tutorials_public/ $pkgdir/usr/share/$pkgname/examples
+ install -Dm644 doc/* $pkgdir/usr/share/doc/$pkgname
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 "README" "$pkgdir/usr/share/licenses/$pkgname/README"
+}
diff --git a/fftw3.patch b/fftw3.patch
new file mode 100644
index 000000000000..345a4c6a86e3
--- /dev/null
+++ b/fftw3.patch
@@ -0,0 +1,11 @@
+--- src/MAKE/Makefile.openmpi.old 2015-05-19 00:03:36.000000000 -0300
++++ src/MAKE/Makefile.openmpi 2015-05-19 07:50:05.492251486 -0300
+@@ -51,7 +51,7 @@
+
+ FFT_INC = -DFFT_FFTW3
+ FFT_PATH =
+-FFT_LIB = -lfftw
++FFT_LIB = -lfftw3
+
+ # JPEG and/or PNG library, OPTIONAL
+ # see discussion in doc/Section_start.html#2_2 (step 7)
diff --git a/usrlocal.patch b/usrlocal.patch
new file mode 100644
index 000000000000..8cf9123a6444
--- /dev/null
+++ b/usrlocal.patch
@@ -0,0 +1,10 @@
+--- src/VORONOI/Makefile.lammps.old 2015-05-19 01:16:44.000000000 -0300
++++ src/VORONOI/Makefile.lammps 2015-05-19 08:09:13.829257967 -0300
+@@ -15,6 +15,6 @@
+
+ # Settings that the LAMMPS build will import when this package is installed
+
+-voronoi_SYSINC = -I/usr/local/include/voro++
++voronoi_SYSINC = -I/usr/include/voro++
+ voronoi_SYSLIB = -lvoro++
+ voronoi_SYSPATH = -L/usr/local/lib