mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 18:25:41 +03:00
this is a million times faster new only in rust 1.68, and fails on older versions, but we have only latest in aports and don't support anything else, so it's okay.
51 lines
1.5 KiB
Text
51 lines
1.5 KiB
Text
# Contributor: Leo <thinkabit.ukim@gmail.com>
|
|
# Maintainer: omni <omni+alpine@hack.org>
|
|
pkgname=onefetch
|
|
pkgver=2.15.1
|
|
pkgrel=0
|
|
pkgdesc="Git repository summary on your terminal"
|
|
url="https://github.com/o2sh/onefetch"
|
|
arch="all !s390x !riscv64" # limiteed by rust/cargo
|
|
license="MIT"
|
|
makedepends="cargo cmake libgit2-dev zlib-dev"
|
|
checkdepends="bash"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://crates.io/api/v1/crates/onefetch/$pkgver/download"
|
|
|
|
# Reduce binary size
|
|
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
|
|
export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo build --frozen --release
|
|
for shellcomp in bash fish zsh; do
|
|
./target/release/onefetch --generate "$shellcomp" > onefetch."$shellcomp"
|
|
done
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
install -Dm0755 target/release/onefetch "$pkgdir"/usr/bin/onefetch
|
|
install -Dm0644 docs/onefetch.1 "$pkgdir"/usr/share/man/man1/onefetch.1
|
|
install -Dm0644 onefetch.bash "$pkgdir"/usr/share/bash-completion/completions/onefetch
|
|
install -Dm0644 onefetch.fish "$pkgdir"/usr/share/fish/completions/onefetch.fish
|
|
install -Dm0644 onefetch.zsh "$pkgdir"/usr/share/zsh/site-functions/_onefetch
|
|
}
|
|
|
|
sha512sums="
|
|
7bdd18f3c82fddbf40279625e4a3f75beb66675e71b001262656d58e3efff597de2f5166a40310c8e1263d388db35d2cc7a1c7314a321345c2c71730ea6ac9bb onefetch-2.15.1.tar.gz
|
|
"
|