ptrcnull fbcf4c4f11 */*: utilise sparse crates.io fetches
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.
2023-03-10 00:35:53 +01:00

53 lines
1.5 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=mcfly
pkgver=0.6.1
pkgrel=0
pkgdesc="Fly through your shell history"
url="https://github.com/cantino/mcfly"
# ppc64le fails to build
# others are limited by rust/cargo
arch="x86_64 armv7 armhf aarch64 x86"
license="MIT"
makedepends="cargo sqlite-dev"
subpackages="
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
source="https://github.com/cantino/mcfly/archive/v$pkgver/mcfly-$pkgver.tar.gz
unbundle-sqlite.patch
"
# Reduce size of the mcfly binary.
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 --release --frozen
}
check() {
cargo test --frozen
}
package() {
cargo install --locked --offline --path . --root="$pkgdir/usr"
rm "$pkgdir"/usr/.crates*
install -Dm 644 mcfly.bash "$pkgdir"/usr/share/bash-completion/completions/mcfly
install -Dm 644 mcfly.fish "$pkgdir"/usr/share/fish/completions/mcfly.fish
install -Dm 644 mcfly.zsh "$pkgdir"/usr/share/zsh/site-functions/_mcfly
}
sha512sums="
3cb781f3c7b27bdbfb25d9ad333a9e12436e6299a8cd68b729e1b24c5099092acdd5e7d5e11ea9f93e6e59e0944695a1224e80c1ff1184cbe23f26080a00d5b2 mcfly-0.6.1.tar.gz
f746d96f39d256eccfde3c9d094d7809037ae328639c8480716ca94484b59ac893b85a10e932eecd77b3bb6bf80e07e336663d239ec20cf58f99179ca407a8c9 unbundle-sqlite.patch
"