%undefine _hardened_build %undefine _include_frame_pointers %define _fortify_level 2 %define _default_patch_fuzz 2 %define with_native %{?_with_native:1}%{?!_with_native:0} %global forgeurl https://github.com/aristocratos/btop %global commit cccf026b3d8f56dbc4b718dc9134261e26779cb1 %global date 20251031 %{?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.5^%{date}git%{shortcommit} Release: 1%{?dist} URL: %{forgeurl} Source: %{url}/archive/%{commit}.tar.gz Patch1: 0001-perf-readfile.patch Patch2: 0002-perf-trim_front.patch Patch3: 0003-perf-move.patch Patch4: 0004-enh-tolower.patch Patch5: 0005-fix-sensor-crit.patch Patch6: 0006-enh-to_int-nodiscard.patch BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build 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 %ifarch x86_64 %if %{with_native} %global _pkg_extra_cxxflags -march=native %else %global _pkg_extra_cxxflags -march=x86-64-v3 %endif %endif %cmake -GNinja %ninja_build -C %{_vpath_builddir} %install %ninja_install -C %{_vpath_builddir} 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*