summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Ehlert2020-01-10 13:24:08 +0100
committerSebastian Ehlert2020-01-10 13:24:08 +0100
commit7e92bd04dea45dcba5d127938d55e85f73c6e753 (patch)
tree04b9ac36233b1c24b9598699e8a8d4c68a132561
downloadaur-7e92bd04dea45dcba5d127938d55e85f73c6e753.tar.gz
initial package build instructions for DFT-D4
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD40
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e920a55053c7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = dftd4-git
+ pkgdesc = A Generally Applicable Atomic-Charge Dependent London Dispersion Correction
+ pkgver = 2.4.0.r82.0419702
+ pkgrel = 1
+ url = https://github.com/dftd4/dftd4
+ arch = x86_64
+ license = LGPL3
+ makedepends = git
+ makedepends = meson
+ makedepends = ninja
+ depends = gcc-fortran
+ depends = openblas
+ depends = lapack
+ provides = dftd4
+ conflicts = dftd4
+ source = dftd4-git::git+https://github.com/dftd4/dftd4.git#branch=master
+ md5sums = SKIP
+
+pkgname = dftd4-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..925f1ea2a264
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Sebastian Ehlert <awvwgk at gmail dot com>
+
+pkgname=dftd4-git
+pkgver=2.4.0.r82.0419702
+pkgrel=1
+arch=('x86_64')
+url="https://github.com/dftd4/dftd4"
+provides=('dftd4')
+depends=('gcc-fortran' 'openblas' 'lapack')
+makedepends=('git' 'meson' 'ninja')
+conflicts=('dftd4')
+license=('LGPL3')
+pkgdesc="A Generally Applicable Atomic-Charge Dependent London Dispersion Correction"
+source=("${pkgname}::git+https://github.com/dftd4/dftd4.git#branch=master")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "${pkgname}"
+ _parent_ver=$(git describe --tags --abbrev=0 | sed 's/\([^-]*-\)g/r\1/;s/-//g' | tr -d '[:alpha:]' )
+ printf "%s.r%s.%s" \
+ "${_parent_ver}" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ mkdir -p "${pkgname}"/_build
+ cd "${pkgname}"/_build
+ meson setup . .. \
+ --buildtype release \
+ --warnlevel 0 \
+ --prefix=/usr \
+ -Dla_backend=openblas
+ ninja
+}
+
+package() {
+ cd "${pkgname}"/_build
+ DESTDIR="$pkgdir" ninja install
+}