glslang/glslang.spec
2018-01-03 12:14:28 +00:00

84 lines
2.3 KiB
RPMSpec

%global commit 715c353a15836e5ae192a64a4cf54e2ce7e8d66a
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global commit_date 20171028
%global gitrel .%{commit_date}.git%{shortcommit}
Name: glslang
Version: 3.1
Release: 0.2%{?gitrel}%{?dist}
Summary: OpenGL and OpenGL ES shader front end and validator
License: BSD and GPLv3+ and ASL 2.0
URL: https://github.com/KhronosGroup
Source0: %url/%{name}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz
Patch0: nodate.patch
Patch1: glslang-default-resource-limits_staticlib.patch
Patch2: glslang_tests.patch
BuildRequires: cmake3
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}
Requires: %{name}%{?_isa} = %{version}-%{release}
%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 -p1 -n %{name}-%{commit}
# Fix rpmlint warning on debuginfo
find . -name '*.h' -or -name '*.cpp' -or -name '*.hpp'| xargs chmod a-x
%build
%__mkdir_p build
pushd build
%cmake3 -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_SKIP_RPATH:BOOL=yes ..
%{make_build}
popd
%install
%{make_install} -C build
%check
pushd Test
./runtests
popd
# Install libglslang-default-resource-limits.a
install -pm 0644 build/StandAlone/libglslang-default-resource-limits.a %{buildroot}%{_libdir}/
%files
%doc README.md README-spirv-remap.txt
%{_bindir}/glslangValidator
%{_bindir}/spirv-remap
%files devel
%{_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.a
%changelog
* Wed Jan 03 2018 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.2.20171028.git715c353
- Add check section to run tests
- Split binaries into main package
* Thu Jul 13 2017 Leigh Scott <leigh123linux@googlemail.com> - 3.1-0.1.20171028.git715c353
- First build