summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ee58a68606fd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Sigvald Marholm <marholm@marebakken.com>
+# Based on dolfin-git, maintained by Lucas H. Gabrielli <heitzmann@gmail.com> and submitted by myles
+
+_base=dolfin
+_fragment="#tag=2017.1.0"
+pkgname=${_base}
+pkgdesc="the C++ and Python interfaces of FEniCS, providing a consistent PSE (Problem Solving Environment) for ordinary and partial differential equations (stable)."
+pkgver=20170509
+pkgrel=1
+arch=('i686' 'x86_64')
+url="https://bitbucket.org/fenics-project/${_base}"
+license=('GPL3')
+groups=('fenics')
+conflicts=('dolfin-git')
+depends=('cppunit' 'eigen' 'gl2ps' 'hdf5' 'python-ffc' 'slepc' 'suitesparse')
+optdepends=('scotch: libraries for graph, mesh and hypergraph partitioning')
+makedepends=('git')
+options=(!emptydirs)
+source=("${_base}::git+https://bitbucket.org/fenics-project/${_base}.git${_fragment}")
+md5sums=('SKIP')
+
+export MAKEFLAGS="-j1"
+
+pkgver() {
+ cd ${_base}
+ git log --format="%cd" --date=short -1 | sed 's/-//g'
+}
+
+build() {
+ cd ${_base}
+ [ -d build ] && rm -rf build
+ mkdir build
+ cd build
+
+ local py_interp=`python -c "import os,sys; print(os.path.realpath(sys.executable))"`
+
+ [ -z "$PETSC_DIR" ] && source /etc/profile.d/petsc.sh
+ [ -z "$SLEPC_DIR" ] && source /etc/profile.d/slepc.sh
+
+ cmake ..\
+ -DCMAKE_INSTALL_PREFIX="${pkg}"/usr \
+ -DPYTHON_EXECUTABLE="${py_interp}" \
+ -DDOLFIN_ENABLE_DOCS=FALSE \
+ -DCMAKE_SKIP_BUILD_RPATH=TRUE \
+ -DCMAKE_SKIP_RPATH=TRUE \
+ -DCMAKE_BUILD_TYPE="Release"
+
+ make
+}
+
+package() {
+ cd ${_base}/build
+ make install DESTDIR="${pkgdir}"
+}
+
+# vim: shiftwidth=2 softtabstop=2 tabstop=2 noexpandtab