summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f5d5434ec7e50fd2b7963ace96fdc6a0ca38cfc (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
# Maintainer: acxz <akashpatel2008 at yahoo dot com>
pkgname=roct-thunk-interface-git
_pkgname=ROCT-Thunk-Interface
pkgver=latest
pkgrel=1
pkgdesc="Radeon Open Compute Thunk Interface"
arch=('x86_64')
url="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface"
license=('MIT')
depends=('numactl' 'pciutils')
makedepends=('git' 'cmake')
provides=('roct-thunk-interface')
conflicts=('roct-thunk-interface')
source=("git+https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  mkdir -p "$srcdir/build"
  cd "$srcdir/build"

  cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/opt/rocm \
        "$srcdir/$_pkgname"
  make all build-dev
}

package() {
  cd "$srcdir/build"

  make DESDIR="$pkgdir" install install-dev

  install -d "$pkgdir/etc/ld.so.conf.d"
  cat << EOF > "$pkgdir/etc/ld.so.conf.d/roct-thunk-interface.conf"
/opt/rocm/lib
EOF
}