%global upstreamname rocThrust %global rocm_release 5.5 %global rocm_patch 1 %global rocm_version %{rocm_release}.%{rocm_patch} # Compiler is hipcc, which is clang based: %global toolchain clang # hipcc does not support some clang flags %global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/') # there is no debug package %global debug_package %{nil} # Option to test suite for testing on real HW: %bcond_with check Name: rocthrust Version: %{rocm_version} Release: 1%{?dist} Summary: ROCm Thrust libary Url: https://github.com/ROCmSoftwarePlatform License: Apache-2.0 and BSD-3-Clause and MIT Source0: %{url}/%{upstreamname}/archive/refs/tags/rocm-%{version}.tar.gz#/%{upstreamname}-%{version}.tar.gz BuildRequires: cmake BuildRequires: compiler-rt BuildRequires: clang-devel #BuildRequires: glibc-headers %if %{with check} BuildRequires: gtest-devel %endif BuildRequires: lld BuildRequires: llvm-devel BuildRequires: rocm-cmake BuildRequires: rocm-comgr-devel BuildRequires: rocm-hip-devel BuildRequires: rocprim-devel BuildRequires: rocm-runtime-devel # Only x86_64 works right now: ExclusiveArch: x86_64 %description Thrust is a parallel algorithm library. This library has been ported to HIP/ROCm platform, which uses the rocPRIM library. %package devel Summary: The %{upstreamname} development package Provides: %{name}-static = %{version}-%{release} %description devel The %{upstreamname} development package. %prep %autosetup -p1 -n %{upstreamname}-rocm-%{version} %build %cmake \ -DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \ %if %{with check} -DBUILD_TEST=ON \ %endif -DCMAKE_INSTALL_LIBDIR=share \ -DCMAKE_CXX_COMPILER=hipcc \ -DROCM_SYMLINK_LIBS=OFF %cmake_build %install %cmake_install mkdir -p %{buildroot}%{_datadir} mv %{buildroot}/usr/lib/cmake %{buildroot}%{_datadir} cp NOTICES.txt %{buildroot}%{_docdir}/%{name}/ %check %if %{with check} %ctest %endif %files devel %doc README.md %license %{_docdir}/%{name}/LICENSE %license %{_docdir}/%{name}/NOTICES.txt %{_includedir}/thrust %{_datadir}/cmake/rocthrust %changelog * Fri Jun 30 2023 Tom Rix - 5.5.1-1 - Initial package