Name: rocm-device-libs Version: 3.9.0 Release: 0%{?dist} Summary: ROCm Device Library License: NCSA URL: https://github.com/RadeonOpenCompute/ROCm Source0: https://github.com/RadeonOpenCompute/ROCR-Device-Libs/archive/rocm-%{version}.tar.gz Patch0: 0001-adjust-CMake-Target-to-match-install-path.patch BuildArch: noarch BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang-devel BuildRequires: cmake BuildRequires: llvm-devel BuildRequires: zlib-devel %description ROCm Device Library %prep %autosetup -n ROCm-Device-Libs-rocm-%{version} -p1 %build mkdir build cd build %cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo %cmake_build %install cd build %cmake_install %define clang_resource_dir "%(clang --print-resource-dir)" # TODO: usually cmake would install the .bc files to /usr/amdgcn/bincode/ # Moving things to the clang resource dir should be the best choice currently: # https://reviews.llvm.org/D82930 mkdir -p %{buildroot}%{clang_resource_dir} mv %{buildroot}%{_prefix}/amdgcn %{buildroot}%{clang_resource_dir}/ mv %{buildroot}%{_prefix}/lib/cmake %{buildroot}%{_libdir} %ldconfig_scriptlets %files %doc README.md %license LICENSE %{_libdir}/cmake # TODO: not sure how to use the clang_resource_dir macro here %{_libdir}/clang %changelog * Mon Nov 23 2020 Philipp Knechtges - 3.9.0-0 - Initial commit