Package shaderc: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | %define sover 1 %define glslang_ver 14.0.0 %define spirv_tools_ver 2023.6 %define build_type RelWithDebInfo %define _cmake %cmake -DCMAKE_BUILD_TYPE=%build_type %def_disable static %def_with doc %if_enabled static %{?optflags_lto:%global optflags_lto %optflags_lto -ffat-lto-objects} %endif Name: shaderc Version: 2023.8 Release: alt0.1 Summary: A collection of tools, libraries and tests for shader compilation Group: Development/C++ License: Apache-2.0 URL: https://github.com/google/shaderc Packager: L.A. Kostis <lakostis@altlinux.org> Source: %name-%version.tar Patch0: %name-%version-%release.patch Patch1: %name-alt-skip-dirs.patch BuildRequires(pre): cmake BuildRequires: gcc-c++ spirv-headers >= 1.5.5 libspirv-tools-devel >= %spirv_tools_ver glslang-devel >= %glslang_ver BuildRequires: python3-devel ninja-build %if_with doc BuildRequires: asciidoctor %endif %description A collection of tools, libraries and tests for shader compilation. At the moment it includes: - glslc, a command line compiler for GLSL/HLSL to SPIR-V, and - libshaderc, a library API for accessing `glslc` functionality. %package -n lib%{name}-devel Summary: %name devel libraries and headers Group: Development/C++ Requires: lib%{name}%{sover} = %EVR %description -n lib%{name}-devel %name development libraries and headers %if_enabled static %package -n lib%{name}-devel-static Summary: %name devel static libraries Group: Development/C++ Requires: lib%{name}-devel = %EVR %description -n lib%{name}-devel-static %name development static libraries %endif %package -n lib%{name}%{sover} Summary: %name support libraries Group: System/Libraries Provides: lib%{name} = %EVR %description -n lib%{name}%{sover} %name support libraries %package -n glslc Summary: command line compiler for GLSL/HLSL to SPIR-V Group: System/Libraries Requires: lib%{name} = %EVR %description -n glslc Command line compiler for GLSL/HLSL to SPIR-V %prep %setup -n %name-%version %patch0 -p1 %patch1 -p1 # Explicitly use python3 in hashbangs. subst '/^#!.*python$/s|python$|python3|' $(grep -Rl '#!.*python$' *) %build %_cmake \ -GNinja \ -DCMAKE_INSTALL_LIBDIR=%_libdir \ -DSHADERC_SKIP_TESTS:BOOL=ON \ -DSHADERC_SKIP_EXAMPLES:BOOL=ON \ -DSHADERC_SPIRV_TOOLS_DIR=%_prefix \ -DSHADERC_SPIRV_HEADERS_DIR=%_includedir \ -DSHADERC_GLSLANG_DIR=%_prefix echo '"%name v%version v%version\\n"' >> %_target_platform/build-version.inc echo '"spirv-tools v%spirv_tools_ver v%spirv_tools_ver\\n"' >> %_target_platform/build-version.inc echo '"glslang v%glslang_ver v%glslang_ver\\n"' >> %_target_platform/build-version.inc ninja \ -vvv \ -j %__nprocs \ -C %_cmake__builddir %install %cmake_install %if_disabled static rm -f %buildroot%_libdir/*.a %endif %files -n lib%{name}%{sover} %_libdir/lib%{name}_shared.so.* %files -n lib%{name}-devel %doc README.md CHANGES AUTHORS LICENSE %_includedir/%{name} %_pkgconfigdir/%name.pc %_libdir/lib%{name}_shared.so %if_enabled static %_libdir/lib%{name}.a %_libdir/lib%{name}_combined.a %_pkgconfigdir/%{name}_static.pc %_pkgconfigdir/%{name}_combined.pc %endif %files -n glslc %_bindir/* %changelog * Fri Mar 08 2024 L.A. Kostis <lakostis@altlinux.ru> 2023.8-alt0.1 - v2023.8. - Bump glslang and SPIRV-Tools deps. * Tue Nov 14 2023 L.A. Kostis <lakostis@altlinux.ru> 2023.7-alt0.1 - v2023.7. - Bump glslang and SPIRV-Tools deps. - Complete packaging in case of static libraries. - Fix debuginfo files generation. * Sun Sep 17 2023 L.A. Kostis <lakostis@altlinux.ru> 2023.6-alt0.1 - v2023.6. * Thu May 25 2023 L.A. Kostis <lakostis@altlinux.ru> 2023.4-alt0.1 - v2023.4. - Bump glslang and SPIRV-Tools deps. * Thu Mar 23 2023 L.A. Kostis <lakostis@altlinux.ru> 2023.3-alt0.1 - v2023.3. - Set cmake release target. * Fri Mar 03 2023 L.A. Kostis <lakostis@altlinux.ru> 2023.2-alt0.1 - v2023.2. - Bump glslang and SPIRV-Tools deps. * Wed Dec 14 2022 L.A. Kostis <lakostis@altlinux.ru> 2022.4-alt0.1 - v2022.4. - Bump glslang and SPIRV-Tools deps. * Sat Oct 15 2022 L.A. Kostis <lakostis@altlinux.ru> 2022.3-alt0.1 - v2022.3. * Mon Oct 03 2022 L.A. Kostis <lakostis@altlinux.ru> 2022.2-alt0.1 - v2022.2. * Sat Nov 13 2021 L.A. Kostis <lakostis@altlinux.ru> 2021.3-alt0.1 - Initial build for ALTLinux. |