Files
desktop/shaderc/shaderc.spec
2026-03-19 22:54:43 +08:00

84 lines
2.0 KiB
RPMSpec

%define lname libshaderc_shared1
Name: shaderc
Version: 2026.1
Release: 0
Summary: A collection of tools, libraries and tests for shader compilation
License: Apache-2.0
Group: Development/Tools/Other
URL: https://github.com/google/shaderc
#Git-Clone: https://github.com/google/shaderc
Source: https://github.com/google/shaderc/archive/v%version.tar.gz
BuildRequires: cmake
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: glslang-devel
BuildRequires: glslang-nonstd-devel
BuildRequires: python3-base
BuildRequires: spirv-headers
BuildRequires: spirv-tools-devel
%description
A collection of tools, libraries and tests for shader compilation.
Included are:
* glslc, a command line compiler for GLSL/HLSL to SPIR-V, and
* libshaderc, a library API for doing the same.
Shaderc wraps around core functionality in glslang and SPIRV-Tools.
%package -n %lname
Summary: SPIR-V shader compiler library
Group: System/Libraries
%description -n %lname
A compiler library for GLSL/HLSL to SPIR-V.
Shaderc wraps around core functionality in glslang and SPIRV-Tools
%package devel
Summary: Header files for the shaderc library
Group: Development/Libraries/C and C++
Requires: %lname = %version
%description devel
A compiler library for GLSL/HLSL to SPIR-V.
Shaderc wraps around core functionality in glslang and SPIRV-Tools
%prep
%autosetup -p1
chmod a+x utils/update_build_version.sh
echo "\"%version\"" >glslc/src/build-version.inc
%build
export CXXFLAGS="%{optflags} -I%_includedir/External"
%cmake -DSHADERC_SKIP_TESTS=ON
%cmake_build
%install
%cmake_install
# Remove static libraries and their pkgconfig files
rm %buildroot/%_libdir/*.a
rm %buildroot/%_libdir/pkgconfig/shaderc_{static,combined}.pc
%ldconfig_scriptlets -n %lname
%files
%license LICENSE
%_bindir/glslc
%files -n %lname
%_libdir/libshaderc_shared.so.1*
%files devel
%_includedir/shaderc/
%_libdir/libshaderc_shared.so
%_libdir/pkgconfig/shaderc.pc
%changelog