# Generated by rust2rpm 27 %bcond check 1 Name: yazi Version: 25.4.8 Release: %autorelease -b 2 Summary: Yazi file manager License: MIT URL: https://yazi-rs.github.io Source: https://github.com/sxyazi/yazi/archive/refs/tags/v%{version}.tar.gz Requires: file Recommends: ffmpeg Recommends: p7zip Recommends: p7zip-plugins Recommends: jq Recommends: poppler-utils Recommends: fd-find Recommends: ripgrep Recommends: fzf Recommends: zoxide Recommends: resvg Recommends: ImageMagick Recommends: git BuildRequires: cargo-rpm-macros >= 24 BuildRequires: make BuildRequires: gcc BuildRequires: git %global _description %{expand: Blazing fast terminal file manager written in Rust, based on async I/O.} %global debug_package %{nil} %description %{_description} %prep %autosetup -n yazi-%{version} -p1 # rust version too low for EPEL 9 and below %if 0%{?el8} || 0%{?el9} bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) --profile=minimal -y %define __rustc $HOME/.cargo/bin/rustc %define __cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' "$HOME/.cargo/bin/cargo" %define __rustdoc $HOME/.cargo/bin/rustdoc %endif # Oniguruma fails to compile because gcc15 defaults to std=gnu23 %if 0%{?fedora} >= 42 %global optflags %{optflags} -std=gnu17 %endif %__cargo vendor %cargo_prep -v vendor %build export YAZI_GEN_COMPLETIONS=1 %cargo_build %{cargo_license} > LICENSE.dependencies %install install -Dpm 0755 -t %{buildroot}%{_bindir} target/release/yazi target/release/ya install -Dpm 0644 yazi-boot/completions/%{name}.bash yazi-cli/completions/ya.bash -t %{buildroot}%{bash_completions_dir} install -Dpm 0644 yazi-boot/completions/%{name}.fish yazi-cli/completions/ya.fish -t %{buildroot}%{fish_completions_dir} install -Dpm 0644 yazi-boot/completions/_%{name} yazi-cli/completions/_ya -t %{buildroot}%{zsh_completions_dir} %if %{with check} %check %cargo_test %endif %files %license LICENSE %license LICENSE-ICONS %license LICENSE.dependencies %doc README.md %{_bindir}/ya %{_bindir}/yazi %{bash_completions_dir}/%{name}.bash %{bash_completions_dir}/ya.bash %{zsh_completions_dir}/_%{name} %{zsh_completions_dir}/_ya %{fish_completions_dir}/%{name}.fish %{fish_completions_dir}/ya.fish %changelog %autochangelog