summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ea641e3b664d75f88f3fd5e660640a837b9cf3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Maintainer: Sebastian Ehlert  <awvwgk at gmail dot com>

pkgname=dftd4-git
pkgver=3.3.0.r162.3d8ef7a
pkgrel=1
arch=('x86_64')
url="https://github.com/dftd4/dftd4"
provides=('dftd4')
depends=('gcc-fortran'
         'openblas'
         'lapack')
makedepends=('meson'
             'ninja'
             'git')
conflicts=('dftd4')
license=('LGPL3')
pkgdesc="A Generally Applicable Atomic-Charge Dependent London Dispersion Correction"
source=("${pkgname}::git+https://github.com/dftd4/dftd4.git#branch=main")
md5sums=('SKIP')

pkgver() {
  cd "${pkgname}"
  _parent_ver=$(git describe --tags --abbrev=0 --match 'v*' | 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() {
  meson setup _build_${CARCH} "${pkgname}" \
      --buildtype=release \
      --prefix=/usr \
      -Dlapack=openblas
  meson compile -C _build_${CARCH}
}

check() {
  meson test -C _build_${CARCH} --num-processes=1
}

package() {
  DESTDIR="$pkgdir" \
  meson install -C _build_${CARCH}
}