archrelease: copy trunk to community-any
[ArchLinux/community.git] / hyperfine / repos / community-x86_64 / PKGBUILD
blobc0f2aafe2795a2027f5f9968eca0eeb64ed603cc
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
3 # Contributor: cauebs <cauebs@pm.me>
5 pkgname=hyperfine
6 pkgver=1.16.1
7 pkgrel=1
8 pkgdesc="A command-line benchmarking tool"
9 url="https://github.com/sharkdp/hyperfine"
10 arch=("x86_64")
11 license=("APACHE" "MIT")
12 depends=(gcc-libs)
13 makedepends=(cargo)
14 source=("$pkgname-$pkgver.tar.gz::https://github.com/sharkdp/$pkgname/archive/v$pkgver.tar.gz")
15 options=(zipman)
16 sha256sums=('ffb3298945cbe2c068ca1a074946d55b9add83c9df720eda2ed7f3d94d7e65d2')
18 prepare() {
19   cd "$srcdir/$pkgname-$pkgver"
20   cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
23 build() {
24   cd "$srcdir/$pkgname-$pkgver"
25   cargo build --release --frozen
28 check() {
29   cd "$srcdir/$pkgname-$pkgver"
30   cargo test --frozen
33 package() {
34   cd "$srcdir/$pkgname-$pkgver"
35   install -Dm644 "LICENSE-APACHE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
36   install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
37   install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
39   install -Dm644 target/release/build/hyperfine-*/out/hyperfine.bash "$pkgdir/usr/share/bash-completion/completions/hyperfine"
40   install -Dm644 target/release/build/hyperfine-*/out/hyperfine.fish "$pkgdir/usr/share/fish/vendor_completions.d/hyperfine.fish"
41   install -Dm644 target/release/build/hyperfine-*/out/_hyperfine "$pkgdir/usr/share/zsh/site-functions/_hyperfine"
43   install -Dm644 doc/hyperfine.1 "$pkgdir/usr/share/man/man1/hyperfine.1"