Created
October 29, 2019 06:10
-
-
Save naetherm/8dce0d9d8873a2b8ee1fcd00f829ed08 to your computer and use it in GitHub Desktop.
hsakmt-roct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Olaf Leidinger <[email protected]> | |
pkgname=hsakmt-roct | |
pkgver=2.9.0 | |
pkgrel=2 | |
pkgdesc="Radeon Open Compute Thunk Interface" | |
_gitdir=ROCT-Thunk-Interface | |
arch=('x86_64') | |
url="https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface" | |
license=('X11/MIT') | |
groups=() | |
depends=(pciutils numactl) | |
makedepends=(git cmake gcc) | |
provides=("${pkgname%-git}") | |
conflicts=("${pkgname%-git}") | |
replaces=() | |
backup=() | |
options=() | |
source=('git+https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface.git#branch=roc-2.9.x') | |
md5sums=('SKIP') | |
pkgver() { | |
cd "$srcdir/${_gitdir}" | |
# Git, tags available | |
printf "%s" "$(git describe --long | sed -e 's:roc-::g' -e 's/\([^-]*-\)g/r\1/;s/-/./g')" | |
} | |
build() { | |
cd "$srcdir/${_gitdir}" | |
mkdir -p build && \ | |
cd build && \ | |
cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm .. && \ | |
make | |
} | |
package() { | |
cd "$srcdir/${_gitdir}/build" | |
make DESTDIR="$pkgdir/" install | |
# additional links | |
mkdir -p "$pkgdir/usr/include" | |
ln -s opt/rocm/libhsakmt/include/libhsakmt "$pkgdir/usr/include" | |
# ldconfig | |
mkdir -p "$pkgdir/etc/ld.so.conf.d" | |
echo "/opt/rocm/libhsakmt/lib" > "$pkgdir/etc/ld.so.conf.d/libhsakmt.conf" | |
############ | |
# dev-parts | |
# pkg-build config file(s) | |
find `pwd` -name "*.pc" -exec install -D '{}' $pkgdir/opt/rocm/libhsakmt ';' | |
# headers, reconstruct tree | |
cd "$srcdir/${_gitdir}/include" | |
find . -name '*.h' -exec install -D '{}' $pkgdir/opt/rocm/libhsakmt/include/libhsakmt/{} ';' | |
# cleanup | |
rm -Rf "$pkgdir/opt/rocm/include" | |
rm -Rf "$pkgdir/opt/rocm/lib" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment