summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 84566fe4d613008e305817b5a5a244b424515d36 (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: André Almeida <andrealmeid@riseup.net>

pkgname=amdgpuinfo-git
_pkgname=amdgpuinfo
pkgrel=1
pkgver=0.2.0.146.1f0e093
pkgdesc="Get information from AMD Radeon GPUs"
arch=('x86_64')
url="https://gitlab.com/andrealmeid/amdgpuinfo"
license=('GPL3')
depends=('pciutils')
makedepends=('git' 'gcc' 'meson')
source=('git+https://gitlab.com/andrealmeid/amdgpuinfo.git')
md5sums=('SKIP')

ver() {
	prefix="        version: '"
	echo $(grep "$prefix" meson.build | sed -e "s/${prefix}//" | sed "s/',//")
}

pkgver() {
	cd "$_pkgname"
	hash=$(git log --pretty=format:'%h' -n 1)
	revision=$(git rev-list --count HEAD)
	echo $(ver).$revision.$hash
}

build() {
	cd "$_pkgname"
	arch-meson build --prefix /usr
	ninja -C build
}

package() {
	cd "$_pkgname"
	DESTDIR="$pkgdir" ninja -C build install
}