From daf4fefd4e783f47688cba072c68ebd14f30b5f7 Mon Sep 17 00:00:00 2001 From: Mystro256 Date: Apr 03 2019 17:07:50 +0000 Subject: Import initial SRPM --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..11218b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/umr-1139876.tar.xz diff --git a/sources b/sources new file mode 100644 index 0000000..e0bad0a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (umr-1139876.tar.xz) = bfb987a8ebe10d396b2a9fcd2cda0c3911d42b04676124c6b4f96821a8c37859c22c110b5299d21d3e52cf592c589887a64f05a6075df7e15c9c41909b4ab957 diff --git a/umr.spec b/umr.spec new file mode 100644 index 0000000..cbc7033 --- /dev/null +++ b/umr.spec @@ -0,0 +1,87 @@ +%global commit 113987639a70762a00fd0d0c344e48a8dee8f64b +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global gitdate 20190403 +%global fgittag %{gitdate}git%{shortcommit} + +Summary: AMDGPU Userspace Register Debugger +Name: umr +Version: 1.0 +Release: 2%{?fgittag:.%{fgittag}}%{?dist} +License: MIT +URL: https://cgit.freedesktop.org/amd/umr +#githash=shortcommit +#git clone git://anongit.freedesktop.org/amd/umr umr-$githash +#git -C umr-$githash checkout $githash +#tar --exclude-vcs -cJvf umr-$githash.tar.xz umr-$githash +Source0: %{name}-%{shortcommit}.tar.xz + +#Glibc is too old prior to EL7, enable rt linking to avoid compilation failure +%if 0%{?rhel} && 0%{?rhel} < 7 +%global enablert 1 +%endif + +#UMR requires llvm >= 7 to enable llvm features, enable for EL8+/F29+ +%if 0%{?rhel} > 7 || 0%{?fedora} > 28 +BuildRequires: llvm-devel +BuildRequires: llvm-static +%else +%global disablellvm 1 +%endif + +#UMR requires a recent libdrm enable libdrm features, enable for EL8+/Fedora +%if 0%{?rhel} > 7 || 0%{?fedora} +BuildRequires: libdrm-devel +%else +%global disablelibdrm 1 +%endif + +BuildRequires: cmake%{?rhel:3} +BuildRequires: gcc-c++ +BuildRequires: libpciaccess-devel +BuildRequires: ncurses-devel +BuildRequires: zlib-devel + +%description +AMDGPU Userspace Register Debugger (UMR) is a tool to read and display, as well +as write to AMDGPU device MMIO, PCIE, SMC, and DIDT registers via userspace. + +%package devel +Summary: UMR development package +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %{name}-static = %{version}-%{release} + +%description devel +AMDGPU Userspace Register Debugger header files and libraries + +%prep +%autosetup -p1 -n %{name}-%{shortcommit} + +%build +%{!?cmake:%global cmake %%cmake3} +%cmake %{?disablellvm:-DUMR_NO_LLVM=ON} \ + %{?disablelibdrm:-DUMR_NO_DRM=ON} \ + %{?enablert:-DUMR_NEED_RT=ON} \ + -DCMAKE_BUILD_TYPE="RELEASE" +%make_build + +%install +%make_install + +%files +%doc README +%{!?_licensedir:%global license %%doc} +%license LICENSE +%{_bindir}/umr +%{_mandir}/man1/* + +%files devel +%{_includedir}/umr* +%{_libdir}/*.a + +%changelog +* Wed Apr 03 2019 Jeremy Newton 1.0-2.20190403git1139876 +- Update to newer git, fixes install issues and all patches upstreamed +- Add missing static provides for devel + +* Thu Mar 21 2019 Jeremy Newton 1.0-1.20190322.git51112c7 +- Intial Package