# Original build file by atim %global debug_package %{nil} Name: bottom Version: 0.12.3 Release: 1%{?dist} Summary: Yet another cross-platform graphical process/system monitor License: MIT URL: https://github.com/ClementTsang/bottom Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source1: %{url}/releases/download/%{version}/completion.tar.gz %if 0%{?el8} || 0%{?el9} BuildRequires: gcc %else BuildRequires: cargo >= 1.85 BuildRequires: rust >= 1.85 %endif %description A customizable cross-platform graphical process/system monitor for the terminal. Supports Linux, macOS, and Windows. Inspired by gtop, gotop, and htop. %prep %setup -q %setup -qDT -a1 %if 0%{?el8} || 0%{?el9} curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y %endif %install export CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_OPT_LEVEL=3 %if 0%{?el8} || 0%{?el9} source "$HOME/.cargo/env" %endif cargo install --root=%{buildroot}%{_prefix} --path=. --locked rm -f %{buildroot}%{_prefix}/.crates.toml \ %{buildroot}%{_prefix}/.crates2.json strip --strip-all %{buildroot}%{_bindir}/* # Completions install -Dpm 0644 _btm %{buildroot}%{_datadir}/zsh/site-functions/_btm install -Dpm 0644 btm.bash %{buildroot}%{_datadir}/bash-completion/completions/btm install -Dpm 0644 btm.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/btm.fish %files %license LICENSE %doc README.md CHANGELOG.md CONTRIBUTING.md sample_configs/ %{_bindir}/btm %{_datadir}/bash-completion/completions/btm %{_datadir}/fish/vendor_completions.d/btm.fish %{_datadir}/zsh/site-functions/_btm