summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e8f1d0c85e2d985f96ec985df50b4fbc05057c46 (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
46
47
48
49
50
51
# Maintainer: Luke Labrie-Cleary <luke dot cleary at copenhagenatomics dot com>
pkgname=double-down-git
pkgver=v1.0.0.r8.g74ab1f9
pkgrel=1
pkgdesc="double-down: A double precision interface to Embree"
arch=('x86_64')
url="https://github.com/pshriwise/double-down"
license=('MIT')

depends=(
    moab-git
    embree
)
makedepends=(
	git
	python
	cmake
	binutils
	make
	gcc-fortran
	eigen
        doxygen
)


provides=("${pkgname%-$pkgver}")
source=("${pkgname}::git+${url}.git")
pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
md5sums=('SKIP')

build() {
	cd $srcdir/$pkgname
	mkdir build && cd build
	cmake .. -DMOAB_DIR=/opt/MOAB \
		 -DCMAKE_INSTALL_PREFIX=/opt/double-down
	_ccores=$(nproc)
	# check if _ccores is a positive integer, if not, serial build
	if [[ "${_ccores}" =~ ^[1-9][0-9]*$ ]]; then
		make -j ${_ccores}
	else
		make
	fi
}

package() {
	cd $srcdir/$pkgname/build
	make DESTDIR="$pkgdir/" install
}