summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d1835651e373f1a689d97571979f4db54f777fa3 (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
42
43
44
45
pkgname=ttop
pkgver=1.5.3
pkgrel=2
pkgdesc="System monitoring tool with historical data service, triggers and top-like TUI"
url="https://github.com/inv2004/ttop"
license=("MIT")
arch=('x86_64')
depends=("glibc")
makedepends=("git" "nim")
source=("git+$url.git#tag=v$pkgver"
        ".INSTALL")
sha256sums=('SKIP'
            'SKIP')
install=".INSTALL"
backup=("etc/ttop.toml")

prepare() {
# Shortcut
  echo -e "[Desktop Entry]
Name=ttop
Exec=ttop
Icon=ttop
Terminal=true
Type=Application
Comment=System monitoring tool with historical data service, triggers and top-like TUI" > ttop.desktop
}

build() {
  export NIMBLE_DIR="$srcdir/NIMBLE_CACHE"
  cd ttop
  nimble -y -d:release build
  nim r src/ttop/onoff.nim
}

package() {
  mkdir -p "$pkgdir/usr/lib/systemd/system" "$pkgdir/etc" "$pkgdir/var/log/ttop"
  install -Dm644 ttop.desktop -t "$pkgdir/usr/share/applications"
  cd ttop
  install -Dm644 .github/images/screen.png "$pkgdir/usr/share/pixmaps/ttop.png"
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/ttop"
  install -Dm644 README.md -t "$pkgdir/usr/share/doc/ttop"
  install -Dm644 usr/lib/systemd/system/* "$pkgdir/usr/lib/systemd/system"
  install -Dm644 etc/* "$pkgdir/etc"
  install -Dm755 ttop -t "$pkgdir/usr/bin"
}