summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9cb2638dff26f538e8a1770b4426aa558153e9a7 (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
# Maintainer: Emil Velikov <emil.l.velikov@gmail.com>

pkgname=umr
pkgver=1.0.10
pkgrel=1
pkgdesc='User Mode Register Debugger for AMDGPU Hardware'
arch=('i686' 'x86_64')
url='https://gitlab.freedesktop.org/tomstdenis/umr'
license=('MIT')
depends=('libpciaccess' 'ncurses' 'llvm-libs')
makedepends=('cmake' 'llvm' 'libdrm')
source=("$url/-/archive/$pkgver/umr-$pkgver.tar.bz2")
sha256sums=('9bb1b9a95d1d2a9f23f8d5126d5c073f82e6a580268f7d7bcafb0d95ce655f79')

build() {
	local cmake_args=(
		-B build -S "$pkgname-$pkgver"
		-DCMAKE_INSTALL_PREFIX=/usr
		-DCMAKE_INSTALL_LIBDIR=lib
		-DCMAKE_BUILD_TYPE=Release
		-DUMR_NO_GUI=ON
	)

	cmake "${cmake_args[@]}"
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	# Remove some files which should not be installed. See:
	# https://gitlab.freedesktop.org/tomstdenis/umr/-/merge_requests/32
	# The MR has landed and was effectively reverted with
	# https://gitlab.freedesktop.org/tomstdenis/umr/-/commit/cdba623668920a0c765c50d84ac66f7b73658ccb
	rm -rf "$pkgdir/usr/include"
	rm -rf "$pkgdir/usr/lib"
	install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 "$pkgname-$pkgver/LICENSE"
}