%define _debugsource_template %{nil} %define debug_package %{nil} %if 0%{?fedora} >= 42 %global optflags %{optflags} -std=gnu17 %endif %bcond_with vendored Name: lla Version: 0.5.4 Release: 6%{?dist} Summary: Blazing fast and highly customizable ls replacement License: MIT URL: https://github.com/chaqchase/lla Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz %if %{with vendored} Source1: %{name}-%{version}-vendor.tar.zst %endif BuildRequires: rust BuildRequires: cargo BuildRequires: gcc BuildRequires: bash-completion %description Blazing fast and highly customizable ls replacement with plugin support, themes, search, diff, and multiple display modes. %prep %autosetup -n %{name}-%{version} %if %{with vendored} tar -xaf %{SOURCE1} mkdir -p .cargo cat > .cargo/config.toml <<'EOF' [source.crates-io] replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor" EOF %endif %build export CARGO_HOME=$PWD/.cargo-home %if %{with vendored} export CARGO_NET_OFFLINE=true cargo build --release --frozen --offline -p lla %else cargo build --release -p lla %endif %install install -Dpm 0755 target/release/lla %{buildroot}%{_bindir}/lla install -d %{buildroot}%{bash_completions_dir} install -d %{buildroot}%{_datadir}/zsh/site-functions install -d %{buildroot}%{_datadir}/fish/vendor_completions.d cp completions/lla.bash %{buildroot}%{bash_completions_dir}/lla cp completions/_lla %{buildroot}%{_datadir}/zsh/site-functions/_lla cp completions/lla.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/lla.fish # upstream completion omits -F so fish never offers path completion for `lla ` echo 'complete -c lla -n "__fish_use_subcommand" -F' \ >> %{buildroot}%{_datadir}/fish/vendor_completions.d/lla.fish chmod 644 %{buildroot}%{bash_completions_dir}/lla chmod 644 %{buildroot}%{_datadir}/zsh/site-functions/_lla chmod 644 %{buildroot}%{_datadir}/fish/vendor_completions.d/lla.fish %files %license LICENSE %doc README.md %{_bindir}/lla %{bash_completions_dir}/lla %{_datadir}/zsh/site-functions/_lla %{_datadir}/fish/vendor_completions.d/lla.fish %changelog * Sat Apr 25 2026 sachesi - 0.5.4-6 - Fix fish shell missing path/directory completion * Thu Apr 23 2026 Your Real Name - 0.5.4-5 - Fix completions * Thu Apr 23 2026 Your Real Name - 0.5.4-3 - Fix packaged shell completions by using --output instead of stdout redirection * Thu Apr 23 2026 Your Real Name - 0.5.4-3 - Create completion directories before installing completions - Fix Fedora 44 build by forcing gnu17 for vendored oniguruma via onig_sys * Thu Apr 23 2026 Your Real Name - 0.5.4-2 - Fix Fedora 44 build by forcing gnu17 for vendored oniguruma via onig_sys * Thu Apr 23 2026 Your Real Name - 0.5.4-1 - Switch to vendored offline COPR build