%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 e17bc6b585f74b579b997865963e525a3bfaa96c %global date 20241108 %{?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: 1%{?dist} URL: %{forgeurl} Source: %{url}/archive/%{commit}.tar.gz Patch0: fmt.patch Patch1: 931.patch 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*