summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b45fe9f39e6d6213493ecf37ac5199340dff15dc (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
# Maintainer: Jakub OkoĊ„ski <jakub@okonski.org>
pkgname=roct-thunk-interface
pkgver=2.6.0
pkgrel=1
pkgdesc="ROCm HSA"
arch=(x86_64)
url="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface"
license=('unknown')
makedepends=(git cmake gcc ninja)
depends=(numactl pciutils)
source=("https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/archive/roc-$pkgver.tar.gz" "fix_build-dev_command.patch")
sha256sums=(
  "649e996c36e52f8ac9bf002780442fcf93cc845e885ef90442ed3f790e36fd00"
  "f58bdd6df3065ad1e08c107e95140445fc01bd46dae27fb9d2091a2f3b5d3d2f"
)

prepare() {
    cd ROCT-Thunk-Interface-roc-$pkgver
    patch -Np1 -i "$srcdir/fix_build-dev_command.patch"
}

build() {
  mkdir -p "$srcdir/build"
  cd "$srcdir/build"
  cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX="$pkgdir/opt/rocm" \
        -G Ninja \
        "$srcdir/ROCT-Thunk-Interface-roc-$pkgver"
  ninja all build-dev
}

package() {
  ninja -C "$srcdir/build" install install-dev
  mkdir -p "$pkgdir/etc/ld.so.conf.d"
  cat <<-EOF > $pkgdir/etc/ld.so.conf.d/roct-thunk-interface.conf
		/opt/rocm/lib64
		EOF
}