%global git_date 20241202 %global git_hash 3fb52548 # Version in ... %global git_ver 2024.4 %global rel 1 %global dir_name SPIRV-Tools %global src_name %{dir_name}-%{git_date}-%{git_hash}.tar.xz Name: spirv-tools Version: %{git_ver}^%{git_date}g%{git_hash} Release: %{rel}%{?dist} Summary: API and commands for processing SPIR-V modules License: ASL 2.0 URL: https://github.com/KhronosGroup/SPIRV-Tools Source0: %{url}/%{src_name} #Patch0: fix-gcc12-build.patch BuildRequires: cmake3 BuildRequires: gcc-c++ BuildRequires: ninja-build #BuildRequires: python3-devel #BuildRequires: python3-rpm-macros BuildRequires: spirv-headers-devel Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description The package includes an assembler, binary module parser, disassembler, and validator for SPIR-V. %package libs Summary: Library files for %{name} Provides: %{name}-libs%{?_isa} = %{version} %description libs library files for %{name} %package devel Summary: Development files for %{name} Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel Development files for %{name} %prep %autosetup -p1 -n %{dir_name} %build %cmake -DSPIRV_SKIP_TESTS=ON \ -DSPIRV-Headers_SOURCE_DIR=%{_prefix} \ -DBUILD_SHARED_LIBS=ON \ -DSPIRV_TOOLS_BUILD_STATIC=OFF \ # -DCMAKE_BUILD_TYPE=Release %cmake_build %install %cmake_install %ldconfig_scriptlets libs %files %license LICENSE %doc README.md CHANGES %{_bindir}/spirv-as %{_bindir}/spirv-cfg %{_bindir}/spirv-dis %{_bindir}/spirv-lesspipe.sh %{_bindir}/spirv-link %{_bindir}/spirv-lint %{_bindir}/spirv-opt %{_bindir}/spirv-reduce %{_bindir}/spirv-val %{_bindir}/spirv-objdump %files libs %{_libdir}/libSPIRV-Tools-link.so %{_libdir}/libSPIRV-Tools-lint.so %{_libdir}/libSPIRV-Tools-opt.so %{_libdir}/libSPIRV-Tools.so %{_libdir}/libSPIRV-Tools-reduce.so %{_libdir}/libSPIRV-Tools-shared.so %{_libdir}/libSPIRV-Tools-diff.so %files devel %{_includedir}/spirv-tools/ %{_libdir}/cmake/* %{_libdir}/pkgconfig/SPIRV-Tools-shared.pc %{_libdir}/pkgconfig/SPIRV-Tools.pc %changelog %autochangelog