%define major 15 %define libname %mklibname %name %{major} %define develname %mklibname %name -d Name: spirv-llvm-translator Version: %{major}.0.0 Release: %mkrel 1 Summary: LLVM to SPIRV Translator Group: System/Libraries License: NCSA URL: https://github.com/KhronosGroup/SPIRV-LLVM-Translator Source0: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v%{version}.tar.gz BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: llvm-devel BuildRequires: llvm-static BuildRequires: spirv-headers %description Khronos LLVM to SPIRV Translator. This is a library to be used by Mesa for OpenCL support. It translate LLVM IR to Khronos SPIR-V. It also includes a standalone tool used for building libclc. %package tools Summary: Standalone llvm to spirv translator tool Group: System/Base Requires: %{libname} = %{version}-%{release} %description tools This package contains the standalone llvm to spirv tool. %package -n %{libname} Summary: Standalone llvm to spirv translator tool lib Group: System/Libraries %description -n %{libname} Khronos LLVM to SPIRV Translator. This is a library to be used by Mesa for OpenCL support. It translate LLVM IR to Khronos SPIR-V. It also includes a standalone tool used for building libclc. %package %{develname} Summary: Development files for LLVM to SPIRV Translator Group: Development/C Requires: %{libname} = %{version}-%{release} %description %{develname} This package contains libraries and header files for developing against %{name} %prep %autosetup -n SPIRV-LLVM-Translator-%{version} %build %cmake -GNinja \ -DLLVM_BUILD_TOOLS=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_RPATH:BOOL=";" \ -DLLVM_EXTERNAL_PROJECTS="SPIRV-Headers" \ -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR="/usr/include/spirv/" %cmake_build %install %cmake_install %files tools %{_bindir}/llvm-spirv %files -n %{libname} %doc README.md %{_libdir}/libLLVMSPIRVLib.so.%{major} %files %{develname} %dir %{_includedir}/LLVMSPIRVLib/ %{_includedir}/LLVMSPIRVLib/ %{_libdir}/libLLVMSPIRVLib.so %{_libdir}/pkgconfig/LLVMSPIRVLib.pc %changelog * Thu Sep 22 2022 tv <tv> 15.0.0-1.mga9 + Revision: 1891451 - Update to llvm 15 * Mon Apr 25 2022 tv <tv> 14.0.0-1.mga9 + Revision: 1853151 - Update to llvm 14 - Rebuild for llvm-14 - Explicitely target spirv-headers - 13.0.0 - Rebuild for llvm 13.0 + umeabot <umeabot> - Mageia 9 Mass Rebuild * Wed Apr 07 2021 tmb <tmb> 12.0.0-0.20210212.1.mga9 + Revision: 1714003 - update to 12.0 from git - ajust for mageia - imported package spirv-llvm-translator * Mon Feb 15 2021 Dave Airlie <airlied@redhat.com> - 11.1.0-1 - Update to llvm 11.1.0 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.0.0-0.2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Aug 19 2020 Dave Airlie <airlied@redhat.com> - 11.0.0-0.1 - Initial package of git snapshot for 11.0.0