# # spec file for package yazi # # Copyright (c) 2024 Jo Carllyle # # Please submit bugfixes or comments via https://github.com/JamesBrosy/rpm-spec-templates # %global _build_id_links none %global debug_package %{nil} Name: yazi Version: 0.4.2 Release: 1%{?dist} Summary: Blazing fast terminal file manager written in Rust, based on async I/O License: MIT Group: Productivity/Text/Utilities URL: https://github.com/sxyazi/yazi Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Patch1: 001-system-lua.patch Requires: file %if 0%{?suse_version} BuildRequires: lua54-devel %else BuildRequires: lua-devel %endif BuildRequires: gcc, curl %if ! 0%{?rhel} BuildRequires: ImageMagick %endif Suggests: ffmpeg Suggests: p7zip Suggests: jq Suggests: poppler Suggests: fd Suggests: ripgrep Suggests: fzf Suggests: zoxide Suggests: ImageMagick Suggests: wl-clipboard Suggests: xsel %description Yazi (means "duck") is a terminal file manager written in Rust, based on non-blocking async I/O. It aims to provide an efficient, user-friendly, and customizable file management experience. πŸ’‘ A new article explaining its internal workings: Why is Yazi Fast? πŸš€ Full Asynchronous Support: All I/O operations are asynchronous, CPU tasks are spread across multiple threads, making the most of available resources. πŸ’ͺ Powerful Async Task Scheduling and Management: Provides real-time progress updates, task cancellation, and internal task priority assignment. πŸ–ΌοΈ Built-in Support for Multiple Image Protocols: Also integrated with Überzug++, covering almost all terminals. 🌟 Built-in Code Highlighting and Image Decoding: Combined with the pre-loading mechanism, greatly accelerates image and normal file loading. πŸ”Œ Concurrent Plugin System: UI plugins (rewriting most of the UI), functional plugins (coming soon), custom previewer, and custom preloader; Just some pieces of Lua. 🧰 Integration with fd, rg, fzf, zoxide πŸ’« Vim-like input/select component, auto-completion for cd paths 🏷️ Multi-Tab Support, Scrollable Preview (for videos, PDFs, archives, directories, code, etc.) πŸ”„ Bulk Renaming, Visual Mode, File Chooser 🎨 Theme System, Custom Layouts, Trash Bin, CSI u ... and more! %package bash-completion Summary: Bash Completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: bash-completion Supplements: (%{name} and bash-completion) BuildArch: noarch %description bash-completion The official bash completion script for %{name}. %package fish-completion Summary: Fish Completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: fish Supplements: (%{name} and fish) BuildArch: noarch %description fish-completion The official fish completion script for %{name}. %package zsh-completion Summary: ZSH Completion for %{name} Group: System/Shells Requires: %{name} = %{version}-%{release} Requires: zsh Supplements: (%{name} and zsh) BuildArch: noarch %description zsh-completion The official zsh completion script for %{name}. %prep %autosetup -p1 %build # install toolchain curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y source "$HOME/.cargo/env" export YAZI_GEN_COMPLETIONS=true export VERGEN_GIT_SHA=%{_os} cargo build --release --locked %install install -Dsm755 target/release/%{name} %{buildroot}%{_bindir}/%{name} install -Dsm755 target/release/ya %{buildroot}%{_bindir}/ya install -Dm 644 yazi-boot/completions/%{name}.bash %{buildroot}%{_datadir}/bash-completion/completions/%{name} install -Dm 644 yazi-boot/completions/%{name}.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/%{name}.fish install -Dm 644 yazi-boot/completions/_%{name} %{buildroot}%{_datadir}/zsh/site-functions/_%{name} install -Dm 644 yazi-cli/completions/ya.bash %{buildroot}%{_datadir}/bash-completion/completions/ya install -Dm 644 yazi-cli/completions/ya.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/ya.fish install -Dm 644 yazi-cli/completions/_ya %{buildroot}%{_datadir}/zsh/site-functions/_ya install -Dm 644 assets/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop %if ! 0%{?rhel} for r in 16 24 32 48 64 128 256; do install -dm755 "%{buildroot}%{_datadir}/icons/hicolor/${r}x${r}/apps" magick assets/logo.png -resize "${r}x${r}" "%{buildroot}%{_datadir}/icons/hicolor/${r}x${r}/apps/yazi.png" done %endif %check export YAZI_GEN_COMPLETIONS=true export VERGEN_GIT_SHA=%{_os} source "$HOME/.cargo/env" cargo test --all %files %license LICENSE LICENSE-ICONS %doc README.md %{_bindir}/%{name} %{_bindir}/ya %if ! 0%{?rhel} %{_datadir}/icons/* %{_datadir}/applications/* %endif %files bash-completion %{_datadir}/bash-completion %files fish-completion %{_datadir}/fish %files zsh-completion %{_datadir}/zsh %changelog * Fri Dec 20 2024 δΈ‰ε’²ι›… Β· Misaki Masa - See Github for full changelog