summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: da1eacd8a5d1e3e60c055df4a36353d7a8b66416 (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
# Maintainer: michaelkuc6 <michaelkuc6 at gmail dot com>
_pkgname=bcl
pkgname="${_pkgname}-git"
pkgver=r189.a1df887
pkgrel=1
pkgdesc="The Berkeley Container Library: a C++ library of distributed data structures with interfaces similar to those in STL containers."
arch=('any')
url="https://github.com/berkeley-container-library/bcl"
license=('BSD')
depends=()
makedepends=('cmake' 'openmpi')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=("${_pkgname}::git+https://github.com/berkeley-container-library/bcl.git")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${_pkgname}"
	( set -o pipefail
    git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

build() {
	cd "${srcdir}/${_pkgname}"
	mkdir -p build
	cd build
	cmake ..
	cmake --build .
}

check() {
	cd "${srcdir}/${_pkgname}/build"
	ctest -R 'global_ptr|hello_world|insert_find'
}

package() {
	cd "${srcdir}/${_pkgname}"
	install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -dm 755 "${pkgdir}/usr/include"
	cp -r bcl "${pkgdir}/usr/include/"
}