File btop.spec of Package btop

#
# spec file for package btop
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           btop
Version:        1.4.5
Release:        0
Summary:        A monitor of resources
License:        Apache-2.0
URL:            https://github.com/aristocratos/btop
Source:         %{name}-%{version}.tar.zst
BuildRequires:  coreutils
BuildRequires:  zstd
%if 0%{?sle_version} == 150600
%define cxxopt CXX=g++-13
%define lddopt LDCXXFLAGS="-ldl -lpthread"
BuildRequires:  gcc13-c++
BuildRequires:  fmt-devel
BuildRequires:  clang17
%else
%define cxxopt %{nil}
%define lddopt %{nil}
BuildRequires:  gcc-c++
%endif

%description
Resource monitor that shows usage and stats for processor, memory, disks, network and processes.
C++ version and continuation of bashtop and bpytop.

%prep
%autosetup

%build
%make_build %{cxxopt} %{lddopt}

%install
%make_install %{cxxopt} %{lddopt} PREFIX=%{_prefix}

%files
%{_bindir}/%{name}
%dir %{_datadir}/%{name}/
%dir %{_datadir}/applications/
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/%{name}/themes/
%{_datadir}/%{name}/themes/*.theme
%dir %{_datadir}/icons/hicolor/
%dir %{_datadir}/icons/hicolor/48x48/
%dir %{_datadir}/icons/hicolor/48x48/apps/
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%dir %{_datadir}/icons/hicolor/scalable/
%dir %{_datadir}/icons/hicolor/scalable/apps/
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%license LICENSE
%doc %{_datadir}/%{name}/README.md

%changelog
openSUSE Build Service is sponsored by