summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0eb4f46b9b9a61b9f6f5eae450aabb8ed2c7102b (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
40
41
# Maintainer: Vladislav Nepogodin <nepogodin.vlad@gmail.com>

pkgname=btop-git
pkgver=1.3.2.r1032.d168073
pkgrel=1
pkgdesc="A monitor of resources"
arch=(x86_64)
url="https://github.com/aristocratos/btop"
license=('Apache-2.0')
depends=('gcc-libs')
makedepends=('gcc' 'make' 'lowdown' 'git')
optdepends=(
  'nvidia-utils: NVIDIA GPU support'
  'rocm-smi-lib: AMD GPU support'
)
source=("${pkgname}::git+https://github.com/aristocratos/btop.git")
sha512sums=('SKIP')
provides=('btop')
conflicts=('btop')

pkgver() {
  cd "${srcdir}/${pkgname}"
  _pkgver="$(cat CHANGELOG.md | grep '^##' | sed 's/## v//g' | head -1)"

  printf "${_pkgver}.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${pkgname}"

  make GPU_SUPPORT=true RSMI_STATIC=false
}

package() {
  cd "${srcdir}/${pkgname}"
  DESTDIR="${pkgdir}" make PREFIX=/usr install

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

# vim:set sw=2 sts=2 et: