maintainer="Hugo Osvaldo Barrera <hugo@whynothugo.nl>"
pkgname=hyperlink
pkgver=0.1.44
pkgrel=0
pkgdesc="Very fast link checker for CI"
url="https://github.com/untitaker/hyperlink"
arch="all"
license="MIT"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/untitaker/hyperlink/archive/refs/tags/$pkgver.tar.gz"


prepare() {
	default_prepare

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

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

check() {
	# Tests try to execute the compiled binary. Without `--release`, they
	# attempt to run the debug binary, which is not present and tests fail.
	cargo test --release --frozen
}

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

sha512sums="
1a329ef009c9dfa02d09aa5712725700fb753f355d8ea844f6cdb94c7571d986178c6e736dfb7d209fdac0818844bca556dc5323a8521bac7c4cd8e8d2001df4  hyperlink-0.1.44.tar.gz
"
