aboutsummaryrefslogtreecommitdiffstats
path: root/community/gotop/APKBUILD
blob: 274fbbfb396058f496a22a15654d07f09b22e4bb (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
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=gotop
pkgver=3.5.0
pkgrel=0
pkgdesc="Terminal based graphical activity monitor"
url="https://github.com/xxxserxxx/gotop"
arch="all"
license="AGPL-3.0-or-later"
options="!check" # No test suite
depends="procps" # Remove once #20 on xxxserxxx/gotop is fixed
makedepends="git go"
source="$pkgname-$pkgver.tar.gz::https://github.com/xxxserxxx/gotop/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/xxxserxxx/gotop"

prepare() {
	default_prepare
	mkdir -p "$srcdir"/src/github.com/xxxserxxx
	mv "$srcdir"/$pkgname-$pkgver "$builddir"/
}

build() {
	GOPATH="$srcdir" go build -v -o bin/$pkgname .
}

package() {
	install -Dm755 bin/$pkgname "$pkgdir"/usr/bin/$pkgname
}

cleanup_srcdir() {
	[ -d src ] && chmod -R +w src
	default_cleanup_srcdir
}

sha512sums="e21a4e5ae73ce7084f9d1afce1e3cf092bfd0d4791c6a2a0dd910ad6dc433bf58bf4df729082ae011d7903a8fcfe7c7984864158d92e5969b6f662f5c5f44ae1  gotop-3.5.0.tar.gz"