1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 03:35:38 +03:00
aports/community/hyperfine/APKBUILD
psykose 39f6fef713 */*: cargo fetch with --target
this does not download deps that won't be used for the default build
target (the ctarget we are building for implicitly).
this makes quite a few fetches faster.. because a ton of crates download
a 10mb "windows-sys" that is never used, amongst other things.

maybe breaks a thing or two.
2023-02-11 16:56:41 +01:00

51 lines
1.4 KiB
Text

# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=hyperfine
pkgver=1.15.0
pkgrel=0
pkgdesc="Command-line benchmarking tool"
url="https://github.com/sharkdp/hyperfine"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # blocked by cargo/rust
license="Apache-2.0 AND MIT"
makedepends="cargo"
subpackages="
$pkgname-doc
$pkgname-bash-completion
$pkgname-zsh-completion
$pkgname-fish-completion
"
source="https://github.com/sharkdp/hyperfine/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}
build() {
cargo build --frozen --release
}
check() {
cargo test all --frozen
}
package() {
install -Dm755 target/release/hyperfine \
"$pkgdir"/usr/bin/hyperfine
install -Dm644 doc/hyperfine.1 \
"$pkgdir"/usr/share/man/man1/hyperfine.1
install -Dm644 target/release/build/hyperfine-*/out/hyperfine.bash \
"$pkgdir/usr/share/bash-completion/completions/hyperfine"
install -Dm644 target/release/build/hyperfine-*/out/_hyperfine \
"$pkgdir/usr/share/zsh/site-functions/_hyperfine"
install -Dm644 target/release/build/hyperfine-*/out/hyperfine.fish \
"$pkgdir/usr/share/fish/completions/hyperfine.fish"
}
sha512sums="
d9d949351725ccc015de71fd417a76d64f663acb1b4e47b06be90c9cf4eeea6266d6bb41adc4998cda1ed1e91dca29443b7e15858f071df0d2ccd82570a7c049 hyperfine-1.15.0.tar.gz
"