summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e2c4260183332d24c2b5cf1f833eaf6b6ad9b35f (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
# Maintainer: Tony Lambiris <tony@libpcap.net>

pkgname=nvtop-git
pkgver=3.0.1.r38.g04721e3
pkgrel=1
pkgdesc="GPUs process monitoring for AMD, Intel and NVIDIA"
arch=('x86_64')
url="https://github.com/Syllo/nvtop"
license=('GPL3')
depends=('ncurses' 'systemd-libs')
makedepends=('cmake' 'libdrm' 'systemd' 'git')
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;s/^v//g'
}

build() {
  cd "${pkgname}"

  cmake -DCMAKE_INSTALL_PREFIX=/usr -DNVIDIA_SUPPORT=ON -DAMDGPU_SUPPORT=ON .
  make
}

package() {
  cd "${pkgname}"

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