%define _debugsource_template %{nil} %define debug_package %{nil} %bcond_with vendored %global time_fix_version 0.3.36 Name: bottom Version: 0.12.3 Release: 3%{?dist} Summary: Cross-platform graphical process and system monitor License: MIT URL: https://github.com/ClementTsang/bottom Source0: https://github.com/ClementTsang/bottom/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz %if %{with vendored} Source1: %{name}-%{version}-vendor.tar.zst %endif BuildRequires: cargo BuildRequires: rust BuildRequires: gcc Requires: hicolor-icon-theme %description bottom, also known as btm, is a customizable cross-platform graphical process and system monitor for the terminal. %prep %autosetup -n %{name}-%{version} # Kill the toolchain file so rustup doesn't attempt network access rm -f rust-toolchain.toml # Fedora 44 has modern Rust. An older time 0.3.x release can fail with E0282 # on Rust 1.80+. The vendored Cargo.lock in Source1 is pre-fixed. # # For vendored COPR builds, Source1 contains: # vendor/ # .cargo/config.toml # Cargo.lock # where Cargo.lock was already updated to time %{time_fix_version}. %if %{with vendored} tar -xaf %{SOURCE1} test -d vendor test -f .cargo/config.toml test -f Cargo.lock %else export CARGO_HOME="$PWD/.cargo-home" %endif %build export CARGO_HOME="$PWD/.cargo-home" export BTM_GENERATE=true export COMPLETION_DIR="$PWD/target/tmp/bottom/completion" export MANPAGE_DIR="$PWD/target/tmp/bottom/manpage" %if %{with vendored} export CARGO_NET_OFFLINE=true cargo build --release --frozen --offline %else cargo build --release --locked %endif %install install -Dpm 0755 target/release/btm \ %{buildroot}%{_bindir}/btm # Man page generated by build.rs when BTM_GENERATE=true. install -Dpm 0644 target/tmp/bottom/manpage/btm.1 \ %{buildroot}%{_mandir}/man1/btm.1 # Shell completions generated by build.rs when BTM_GENERATE=true. install -Dpm 0644 target/tmp/bottom/completion/btm.bash \ %{buildroot}%{_datadir}/bash-completion/completions/btm install -Dpm 0644 target/tmp/bottom/completion/btm.fish \ %{buildroot}%{_datadir}/fish/vendor_completions.d/btm.fish install -Dpm 0644 target/tmp/bottom/completion/_btm \ %{buildroot}%{_datadir}/zsh/site-functions/_btm %check %{buildroot}%{_bindir}/btm --version %files %license LICENSE %doc README.md %{_bindir}/btm %{_mandir}/man1/btm.1* %{_datadir}/bash-completion/completions/btm %{_datadir}/fish/vendor_completions.d/btm.fish %{_datadir}/zsh/site-functions/_btm %changelog * Tue May 05 2026 sachesi - 0.12.3-3 - Fix non-vendored build: remove cargo update -p time --precise (version too old for bottom 0.12.3) * Tue May 05 2026 sachesi - 0.12.3-2 - Default to online build (--without vendored). Set enable_net=True in Copr. * Tue May 05 2026 sachesi - 0.12.3-1 - Update to 0.12.3 - Switch %bcond_with vendored to %bcond_without vendored so COPR defaults to offline builds - Remove rust-toolchain.toml in %%prep to prevent rustup toolchain fetch in offline builds * Tue Apr 28 2026 sachesi - 0.9.6-2 - Update time crate to 0.3.36 during build/vendoring to fix Rust 1.80+ E0282 - Generate and install man page plus Bash, Fish, and Zsh completions * Tue Apr 28 2026 sachesi - 0.9.6-1 - Initial import