summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 17e79bd0242b6d8d17d668f1a426a6f14089037a (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
52
53
54
55
# Maintainer:  Anton Kudelin <kudelin at protonmail dot com>
# Contributor: Christian Pfeiffer <cpfeiffer at live de>
# Contributor: Michael Straube <straubem gmx de>
# Contributor: xantares <xantares09 at hotmail dot com>

pkgname=combblas
_PkgName=CombBLAS
pkgver=1.6.2+r4666
pkgrel=2
pkgdesc="A library offering a set of linear algebra primitives for graph analytics"
arch=('x86_64')
url="https://github.com/PASSIONLab/CombBLAS"
license=("BSD")
depends=('openmpi')
makedepends=('cmake' 'git')
source=("git+$url.git")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$_PkgName"
  printf "1.6.2+r%s" "$(git rev-list --count HEAD)"
}

prepare() {
  mkdir build
}

build() {
  cd build

  # Some tests are computationally heavy MPI stuff, so avoid them
  cmake ../$_PkgName \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install

  # Remove OS X leftover files
  find "$pkgdir" -name "*.DS_Store" -delete
  find "$pkgdir" -name "._*" -delete

  install -Dm644 "$srcdir/$_PkgName/LICENSE" \
    -t "$pkgdir/usr/share/licenses/$pkgname"

  # Add extra headers
  install -Dm644 "$srcdir/$_PkgName"/Applications/*.h \
    -t "$pkgdir/usr/include/CombBLAS/Applications"
  install -Dm644 "$srcdir/$_PkgName"/Applications/BipartiteMatchings/*.h \
    -t "$pkgdir/usr/include/CombBLAS/Applications/BipartiteMatchings"
}