File amdgpu_top.spec of Package amdgpu_top
#
# spec file for package amdgpu_top
#
# Copyright (c) 2022 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/
#
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
Name: amdgpu_top
Version: 0.9.0
Release: 0
Summary: Tool display AMD usage
License: Apache-2.0 AND MIT
URL: https://github.com/Umio-Yasuno/amdgpu_top
Source0: https://github.com/Umio-Yasuno/amdgpu_top/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.zst
%if 0%{?suse_version}
BuildRequires: cargo-packaging
BuildRequires: rust+cargo
%else
BuildRequires: cargo >= 1.64
%endif
BuildRequires: zstd
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libdrm_amdgpu)
%description
amdgpu_top is tool that display AMD GPU utilization, like umr or clbr/radeontop
or intel_gpu_top.
%prep
%autosetup -a1
%build
%{cargo_build}
%install
install -Dm 0755 %{_builddir}/%{name}-%{version}/target/release/%{name} %{buildroot}%{_bindir}/%{name}
%files
%{_bindir}/amdgpu_top
%changelog