%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 5f9147d55b4ef872aff81385f2123356dbfcde07 %global date 20250417 %{?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.0^%{date}git%{shortcommit} Release: 2%{?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}" # FORTIFY_SOURCE comes from distribution-wide _fortify_level %make_build FORTIFY_SOURCE=false 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*