summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ccab1af9c21995dbc02bc1d33972a4e257367396 (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
39
# Maintainer: Tony Lambiris <tony@criticalstack.com>

pkgname=nvtop-git
pkgver=1.0.0.r3.g453f025
pkgrel=1
pkgdesc="A (h)top like task monitor for NVIDIA GPUs"
arch=('x86_64')
url="https://github.com/Syllo/nvtop"
license=('GPL3')
depends=('nvidia-utils' 'ncurses')
makedepends=('cmake' 'cuda')
provides=('nvtop')
conflicts=('nvtop')
source=("${pkgname}::git+https://github.com/Syllo/nvtop.git")
sha256sums=('SKIP')

pkgver() {
	cd "${pkgname}"

	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	cd "${srcdir}/${pkgname}"

	mkdir -p build

    cmake . -Wno-dev -DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release -B build
	make -C build
}

package() {
	cd "${srcdir}/${pkgname}"

    make -C build DESTDIR="$pkgdir/" install

	install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}