Mystro256 745be2d
%global commit cf9e2f8029c3b1871480dc04e0036a20276fbcc0
Mystro256 daf4fef
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Mystro256 745be2d
%global gitdate 20200709
Mystro256 daf4fef
%global fgittag %{gitdate}git%{shortcommit}
Mystro256 daf4fef
Mystro256 daf4fef
Summary: AMDGPU Userspace Register Debugger
Mystro256 daf4fef
Name: umr
Mystro256 daf4fef
Version: 1.0
47c314d
Release: 8%{?fgittag:.%{fgittag}}%{?dist}
Mystro256 daf4fef
License: MIT
Mystro256 4439ca5
URL: https://gitlab.freedesktop.org/tomstdenis/umr
Mystro256 4439ca5
Source0: https://gitlab.freedesktop.org/tomstdenis/%{name}/-/archive/%{shortcommit}/%{name}-%{shortcommit}.tar.gz
Mystro256 daf4fef
Mystro256 daf4fef
#Glibc is too old prior to EL7, enable rt linking to avoid compilation failure
Mystro256 daf4fef
%if 0%{?rhel} && 0%{?rhel} < 7
Mystro256 daf4fef
%global enablert 1
Mystro256 daf4fef
%endif
Mystro256 daf4fef
Mystro256 daf4fef
#UMR requires llvm >= 7 to enable llvm features, enable for EL8+/F29+
Mystro256 daf4fef
%if 0%{?rhel} > 7 || 0%{?fedora} > 28
Mystro256 daf4fef
BuildRequires: llvm-devel
Mystro256 daf4fef
%else
Mystro256 daf4fef
%global disablellvm 1
Mystro256 daf4fef
%endif
Mystro256 daf4fef
Mystro256 daf4fef
#UMR requires a recent libdrm enable libdrm features, enable for EL8+/Fedora
Mystro256 daf4fef
%if 0%{?rhel} > 7 || 0%{?fedora}
Mystro256 daf4fef
BuildRequires: libdrm-devel
Mystro256 daf4fef
%else
Mystro256 daf4fef
%global disablelibdrm 1
Mystro256 daf4fef
%endif
Mystro256 daf4fef
Mystro256 daf4fef
BuildRequires: cmake%{?rhel:3}
Mystro256 daf4fef
BuildRequires: gcc-c++
Mystro256 daf4fef
BuildRequires: libpciaccess-devel
Mystro256 daf4fef
BuildRequires: ncurses-devel
Mystro256 daf4fef
BuildRequires: zlib-devel
Mystro256 daf4fef
Mystro256 daf4fef
%description
Mystro256 daf4fef
AMDGPU Userspace Register Debugger (UMR) is a tool to read and display, as well
Mystro256 daf4fef
as write to AMDGPU device MMIO, PCIE, SMC, and DIDT registers via userspace.
Mystro256 daf4fef
Mystro256 daf4fef
%package devel
Mystro256 daf4fef
Summary: UMR development package
Mystro256 daf4fef
Requires: %{name}%{?_isa} = %{version}-%{release}
Mystro256 daf4fef
Provides: %{name}-static = %{version}-%{release}
Mystro256 daf4fef
Mystro256 daf4fef
%description devel
Mystro256 daf4fef
AMDGPU Userspace Register Debugger header files and libraries
Mystro256 daf4fef
Mystro256 daf4fef
%prep
Mystro256 daf4fef
%autosetup -p1 -n %{name}-%{shortcommit}
Mystro256 daf4fef
Mystro256 daf4fef
%build
Mystro256 daf4fef
%{!?cmake:%global cmake %%cmake3}
Mystro256 daf4fef
%cmake %{?disablellvm:-DUMR_NO_LLVM=ON} \
Mystro256 daf4fef
	%{?disablelibdrm:-DUMR_NO_DRM=ON} \
Mystro256 daf4fef
	%{?enablert:-DUMR_NEED_RT=ON} \
Mystro256 daf4fef
	-DCMAKE_BUILD_TYPE="RELEASE"
e63166a
%cmake_build
Mystro256 daf4fef
Mystro256 daf4fef
%install
e63166a
%cmake_install
Mystro256 daf4fef
Mystro256 daf4fef
%files
Mystro256 daf4fef
%doc README
Mystro256 daf4fef
%license LICENSE
Mystro256 daf4fef
%{_bindir}/umr
Mystro256 daf4fef
%{_mandir}/man1/*
Mystro256 daf4fef
Mystro256 daf4fef
%files devel
Mystro256 daf4fef
%{_includedir}/umr*
Mystro256 daf4fef
%{_libdir}/*.a
Mystro256 daf4fef
Mystro256 daf4fef
%changelog
47c314d
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-8.20200709gitcf9e2f8
47c314d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
47c314d
Mystro256 745be2d
* Thu Jul 09 2020 Jeremy Newton <alexjnewt AT hotmail DOT com> - 1.0-7.20200709gitcf9e2f8
Mystro256 745be2d
- Update to newer git
Mystro256 745be2d
- Drop static llvm dependency
Mystro256 745be2d
1499524
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-6.20191210git0affde7
1499524
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
1499524
Mystro256 c3668f5
* Sun Dec 15 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-5.20191210git0affde7
Mystro256 c3668f5
- Update to newer git
Mystro256 c3668f5
4f1ce7f
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-4.20190514gitcb1cb54
4f1ce7f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
4f1ce7f
Mystro256 4439ca5
* Wed May 29 2019 Jeremy Newton <alexjnewt AT hotmail DOT com> 1.0-3.20190514gitcb1cb54
Mystro256 4439ca5
- Update to newer git, switch to gitlab
Mystro256 4439ca5
Mystro256 daf4fef
* Wed Apr 03 2019 Jeremy Newton <alexjnewt AT hotmail DOT com> 1.0-2.20190403git1139876
Mystro256 daf4fef
- Update to newer git, fixes install issues and all patches upstreamed
Mystro256 daf4fef
- Add missing static provides for devel
Mystro256 daf4fef
Mystro256 daf4fef
* Thu Mar 21 2019 Jeremy Newton <alexjnewt AT hotmail DOT com> 1.0-1.20190322.git51112c7
Mystro256 daf4fef
- Intial Package