%global toolchain clang Name: intel-opencl-clang Version: 13.0.0 Release: 1%{?dist} Summary: Library to compile OpenCL C kernels to SPIR-V modules License: NCSA URL: https://github.com/intel/opencl-clang Source0: %{url}/archive/v%{version}/opencl-clang-v%{version}.tar.gz BuildRequires: cmake BuildRequires: make BuildRequires: llvm-devel BuildRequires: clang-devel BuildRequires: spirv-llvm-translator-devel BuildRequires: zlib-devel %description opencl-clang is a thin wrapper library around clang. The library has OpenCL-oriented API and is capable to compile OpenCL C kernels to SPIR-V modules. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains libraries and header files for developing against %{name} %prep %setup -q -n opencl-clang-%{version} %build %cmake -DPREFERRED_LLVM_VERSION='%(rpm -q --qf '%%{version}' llvm-devel | cut -d. -f1 | sed "s/$/.0.0/")' %cmake_build %install %cmake_install %files %license LICENSE %{_libdir}/libopencl-clang.so.* %files devel %{_libdir}/libopencl-clang.so %{_includedir}/cclang/common_clang.h %changelog * Mon Dec 06 2021 Frantisek Zatloukal - 13.0.0-1 - Initial package