Skip to content

Instantly share code, notes, and snippets.

@ulyssesrr ulyssesrr/PKGBUILD
Last active Mar 16, 2019

Embed
What would you like to do?
roct-thunk-interface PKGBUILD for version 2.2.0
# Maintainer: Jakub Okoński <jakub@okonski.org>
pkgname=roct-thunk-interface
pkgver=2.2.0.r0.g876627e
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)
source=("git+https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git#tag=roc-2.2.0" "fix_build-dev_command.patch")
sha256sums=("SKIP" "bbbc02908fdde51b46eb87f1ee68d0d6172aa83f76f7eaed4bf4e2eb17633615")
prepare() {
cd ROCT-Thunk-Interface
patch -Np1 -i "${srcdir}/fix_build-dev_command.patch"
}
pkgver() {
cd "$srcdir/ROCT-Thunk-Interface"
TAG_PREFIX="roc-"
git describe --long --tags | sed "s/^$TAG_PREFIX//;s/\([^-]*-g\)/r\1/;s/-/./g"
}
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
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.