%undefine _hardened_build %undefine _include_frame_pointers %define _fortify_level 2 %define _default_patch_fuzz 2 %global forgeurl https://github.com/aristocratos/btop %global commit 99dac3eb764dcea63ae5c7cfc6a32e78264df986 %global date 20250502 %{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})} Summary: Modern and colorful command line resource monitor that shows usage and stats License: ASL 2.0 Name: btop Version: 1.4.2^%{date}git%{shortcommit} Release: 1%{?dist} URL: %{forgeurl} Source: %{url}/archive/%{commit}.tar.gz BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: make BuildRequires: lowdown Requires: hicolor-icon-theme %global _description %{expand: Resource monitor that shows usage and stats for processor, memory, disks, network and processes.} %description %{_description} %prep %autosetup -p1 -n %{name}-%{commit} %build # Incorporate OPTFLAGS since it gets overwritten by distribution-wide flags otherwise %ifarch x86_64 export OPTFLAGS="-march=x86-64-v3" %endif export CXXFLAGS="${CXXFLAGS} ${OPTFLAGS}" %make_build OPTFLAGS="" %install %make_install PREFIX=%{_prefix} rm -f %{buildroot}%{_datadir}/%{name}/README.md %check desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %files %license LICENSE %doc README.md CHANGELOG.md %{_bindir}/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/%{name} %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_mandir}/man1/%{name}.1*