# Contributor: fossdd <fossdd@pwned.life>
# Maintainer: fossdd <fossdd@pwned.life>
pkgname=bpftop
pkgver=0.5.2
pkgrel=0
pkgdesc="Dynamic real-time view of running eBPF programs"
url="https://github.com/Netflix/bpftop"
arch="all"
license="Apache-2.0"
depends="
	libgcc
	zlib
	"
makedepends="
	cargo-auditable
	git
	linux-headers
	elfutils-dev
	clang
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/Netflix/bpftop/archive/refs/tags/v$pkgver.tar.gz"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen --release
}

package() {
	install -Dm755 target/release/bpftop -t "$pkgdir"/usr/bin/
}

sha512sums="
591abcac3c8a13a594ba079654dcdf081bcbaa85dddc5ad893420a34906d2db156fa086fe98e80658476685def38ac3c10724f1718e511ba83da62f06d89416d  bpftop-0.5.2.tar.gz
"
