# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=gping
pkgver=1.17.3
pkgrel=0
pkgdesc="Ping, but with a graph"
url="https://github.com/orf/gping"
license="MIT"
arch="all"
makedepends="cargo cargo-auditable"
source="https://github.com/orf/gping/archive/gping-v$pkgver/gping-$pkgver.tar.gz"
builddir="$srcdir/gping-gping-v$pkgver"
options="net" # fetch dependencies

prepare() {
	default_prepare

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

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

check() {
	cargo test --frozen
}

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

sha512sums="
d2b39e339ab956845b3316949d94b6b01f489fa653911fe228f328a07d6537fb5fbe9afeb493a47ef8871023b10c6a23f88ee0ba27a9999e00c9301c1febfd02  gping-1.17.3.tar.gz
"
