Name: gl3w %define snapshot_upstream_version 0 %define snapshot_date 20250923 %define snapshot_hash 97a85e1 Version: %{snapshot_upstream_version}^1.%{snapshot_date}git%{snapshot_hash} Release: 1%{?dist} Summary: OpenGL core profile loading License: Unlicense URL: https://github.com/skaslev/%{name} Source0: %{url}/archive/%{snapshot_hash}.tar.gz#downloadas=/%{name}-%{snapshot_hash}.tar.gz %define khronos_rawfiles_url https://raw.githubusercontent.com/KhronosGroup/ %define upstream_GL_hash a77f5b6 Source1: %{khronos_rawfiles_url}/OpenGL-Registry/%{upstream_GL_hash}/api/GL/glcorearb.h#downloadas=glcorearb-%{upstream_GL_hash}.h %define upstream_KHR_hash 57b4876 Source2: %{khronos_rawfiles_url}/EGL-Registry/%{upstream_KHR_hash}/api/GL/khrplatform.h#downloadas=khrplatform-%{upstream_KHR_hash}.h Patch0: %{name}-noheaderdownloads.patch Patch1: %{name}-cmakealiases.patch BuildRequires: cmake gcc-c++ pkgconfig(glu) pkgconfig(libglvnd) python3 unzip Requires: pkgconfig(glu) pkgconfig(glx) pkgconfig(libglvnd) pkgconfig(opengl) %description gl3w is the easiest way to get your hands on the functionality offered by the OpenGL core profile specification. Its main part is a simple gl3w_gen.py Python script that downloads the Khronos supported glcorearb.h header and generates gl3w.h and gl3w.c from it. Those files can then be added and linked (statically or dynamically) into your project. %package devel Summary: Header files for gl3w BuildArch: noarch %description devel This package contains header files for gl3w. gl3w is the easiest way to get your hands on the functionality offered by the OpenGL core profile specification. %prep %define source_dir %{name}-%{snapshot_hash} [ -d %{source_dir} ] && %__rm -rf %{source_dir} %__mkdir -p %{source_dir} && \ %__tar -xvf %{SOURCE0} -C %{source_dir} --strip-components 1 %autosetup -T -D -n %{name}-%{snapshot_hash} -p0 %build %global debug_package %{nil} %define _gl3w_gen_includedir %_vpath_builddir/include %__mkdir -p %_gl3w_gen_includedir/{GL,KHR} %__cp -p %{SOURCE1} %_gl3w_gen_includedir/GL/glcorearb.h %__cp -p %{SOURCE2} %_gl3w_gen_includedir/KHR/khrplatform.h %cmake %cmake_build %install %cmake_install %files devel %license UNLICENSE %{_includedir}/gl3w %{_datadir}/gl3w %changelog * Sun Oct 12 2025 Honore Doktorr - Initial package (of 20250923 snapshot)