1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-24 19:55:26 +03:00
aports/community/mcfly/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: 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"
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
"