# Spec file for intel-graphics-compiler (IGC) Name: intel-graphics-compiler Version: 1.0.17537.24 Release: 1%{?dist} Summary: Intel Graphics Compiler for OpenCL License: MIT and Apache-2.0 URL: https://github.com/intel/intel-graphics-compiler Source0: intel-graphics-compiler-legacy-igc-1.0.17537.24.zip # BuildRequires for IGC. IGC is heavily dependent on LLVM/Clang. # Ensure these versions are compatible with the IGC source. # Fedora 42 should have recent enough versions. BuildRequires: cmake >= 3.10 BuildRequires: git BuildRequires: clang-devel BuildRequires: llvm-devel BuildRequires: spirv-headers-devel BuildRequires: spirv-tools-devel BuildRequires: zlib-devel BuildRequires: gmmlib-devel # Intel Graphics Memory Management Library BuildRequires: json-c-devel BuildRequires: libxml2-devel # For some tools/utilities within IGC BuildRequires: patchelf %description The Intel Graphics Compiler (IGC) for OpenCL is an LLVM-based compiler for OpenCL and oneAPI Level Zero, specifically targeting Intel graphics hardware architectures. It translates OpenCL C and SPIR-V code into Intel GPU assembly. %package -n intel-igc-core Summary: Intel Graphics Compiler core libraries Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} %description -n intel-igc-core This package contains the core libraries for the Intel Graphics Compiler (IGC). It is a fundamental component for Intel's compute runtime and graphics stack. %package -n intel-igc-opencl Summary: Intel Graphics Compiler OpenCL component Group: System Environment/Libraries Requires: %{name} = %{version}-%{release} Requires: intel-igc-core = %{version}-%{release} %description -n intel-igc-opencl This package contains the OpenCL-specific components of the Intel Graphics Compiler (IGC), including the OpenCL frontend and related libraries. %package -n intel-igc-devel Summary: Development files for Intel Graphics Compiler Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: intel-igc-opencl = %{version}-%{release} # Typically, development files are bundled in one package. %description -n intel-igc-devel This package contains the development headers, static libraries, and CMake configuration files for building applications that integrate with or require components of the Intel Graphics Compiler. %prep %setup -q %build # Create a build directory %cmake -B build \ -DIGC_INSTALL_FRONTEND_OPENCL_DEV_DEPS=OFF \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_SKIP_RPATH=ON \ -DIGC_OPTION__LLVM_MODE=SYSTEM_LLVM \ -DLLVM_BUILD_DIR="%{_libdir}/llvm" \ -DLLVM_DIR="%{_libdir}/llvm/cmake" \ -DCLANG_BUILD_DIR="%{_libdir}/clang" \ -DCLANG_DIR="%{_libdir}/clang/cmake" %cmake_build -C build %install %cmake_install -C build # Fix RPATH for the installed libraries # This is crucial for COPR builds to ensure libraries link correctly find %{buildroot}%{_libdir} -name "*.so" -exec patchelf --remove-rpath {} \; 2>/dev/null || : find %{buildroot}%{_libdir} -name "*.so.*" -exec patchelf --remove-rpath {} \; 2>/dev/null || : %files -n intel-igc-core %license LICENSE %{_libdir}/libigc.so %{_libdir}/libigc.so.* %{_libdir}/libvc.so %{_libdir}/libvc.so.* %{_libdir}/libocloc.so %{_libdir}/libocloc.so.* %{_bindir}/ocloc # This path might change slightly based on IGC version, verify after build %{_libdir}/intel-igc/ %files -n intel-igc-opencl %{_libdir}/libigdfcl.so %{_libdir}/libigdfcl.so.* # Additional OpenCL-specific components if any %files -n intel-igc-devel %{_includedir}/igc/ %{_libdir}/cmake/intel-graphics-compiler/ %{_libdir}/pkgconfig/intel-graphics-compiler.pc # Add any other development specific files here. %changelog %autochangelog