%global commit 91c46c656720a6e1e71a3411cd1f4f792b427b2d %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commit_date 20170612 %global gitrel .%{commit_date}.git%{shortcommit} Name: glslang Version: 3.1 Release: 0.1%{?gitrel}%{?dist} Summary: OpenGL and OpenGL ES shader front end and validator License: BSD and GPLv3+ URL: https://github.com/KhronosGroup Source0: %url/%{name}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ %description %{name} is the official reference compiler front end for the OpenGL ES and OpenGL shading languages. It implements a strict interpretation of the specifications for these languages. %package devel Summary: Development files for %{name} %description devel %{name} is the official reference compiler front end for the OpenGL ES and OpenGL shading languages. It implements a strict interpretation of the specifications for these languages. %prep %autosetup -n %{name}-%{commit} # Fix rpmlint warning on debuginfo find . -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x %build mkdir build pushd build %cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=%{_libdir} .. %{make_build} popd %install pushd build %{make_install} popd # Install .so file install -pm 0755 build/StandAlone/libglslang-default-resource-limits.so %{buildroot}%{_libdir}/ %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files devel %doc README.md README-spirv-remap.txt %{_bindir}/glslangValidator %{_bindir}/spirv-remap %{_includedir}/SPIRV/ %{_includedir}/glslang/ %{_libdir}/libHLSL.a %{_libdir}/libOGLCompiler.a %{_libdir}/libOSDependent.a %{_libdir}/libSPIRV.a %{_libdir}/libSPVRemapper.a %{_libdir}/libglslang.a %{_libdir}/libglslang-default-resource-limits.so %changelog * Thu Jul 13 2017 Leigh Scott - 3.1-0.1.20170612.git91c46c6 - First build