pkgname=yazi pkgver=25.5.31 pkgdesc="Blazing fast terminal file manager written in Rust, based on async I/O." homepage="https://yazi-rs.github.io" license=("MIT") depends=("oniguruma") sources=("${pkgname}-${pkgver}.tar.gz") urls=("https://github.com/sxyazi/yazi/archive/refs/tags/v${pkgver}.tar.gz") sha512sums=("c390d3e813cbefbe5c430df521f7d563aff8461eb249a90a11fba05db56205bfce5df0f15ae7a57aa8a47cff34094b969fe6fbdfa9cd9a102dba3b8cc9c30911") src_prepare() { tar -xf ${distdir}/${sources[0]} --strip-components=1 sed -i -r 's/strip\s+= true/strip = false/' Cargo.toml cargo fetch --locked --target "$(rustc --print host-tuple)" } src_build() { export YAZI_GEN_COMPLETIONS=true export RUSTONIG_SYSTEM_LIBONIG=1 cargo build --frozen --release --no-default-features } _install_completions() { pushd "$1/completions" install -Dm644 "$2.bash" "$pkgdir/usr/share/bash-completion/completions/$2" install -Dm644 "$2.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/" install -Dm644 "_$2" -t "$pkgdir/usr/share/zsh/site-functions/" popd } src_install() { install -Dm755 "target/release/$pkgname" -t "$pkgdir/usr/bin/" install -Dm755 "target/release/ya" -t "$pkgdir/usr/bin/" install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/" install -Dm644 "README.md" -t "$pkgdir/usr/share/doc/$pkgname-${pkgver}/" install -Dm644 "assets/yazi.desktop" -t "$pkgdir/usr/share/applications/" _install_completions "$pkgname-boot" "$pkgname" _install_completions "$pkgname-cli" "ya" } # vim:ft=sh syn=sh et sw=2: