File nvtop.spec of Package nvtop

#
# spec file for package nvtop
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2020-2025 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# 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:           nvtop
Version:        @SERVICE@
Release:        0
Summary:        A (h)top like task monitor for NVIDIA and AMD GPUs
License:        GPL-3.0-or-later
URL:            https://github.com/Syllo/nvtop
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  cmake >= 3.18
BuildRequires:  cmake(GTest)
BuildRequires:  desktop-file-utils
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libdrm)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(systemd)

%description
Nvtop stands for NVidia TOP, a (h)top like task monitor for AMD, NVIDIA and
now Intel GPUs.
It can handle multiple GPUs and print information about them in a htop
familiar way.

%prep
%autosetup -p1

%build
%cmake \
    -DBUILD_TESTING=ON
%cmake_build

%install
%cmake_install

%check
%ctest
desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop

%files
%doc README.markdown
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.??g
%{_mandir}/man?/%{name}.?%{?ext_man}
%{_datadir}/metainfo/io.github.syllo.%{name}.metainfo.xml
%license LICENSE

%changelog
openSUSE Build Service is sponsored by