summaryrefslogtreecommitdiff
path: root/glfw.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-30 04:25:05 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-30 04:25:05 +0000
commit1cff885c19411aa46eeb1de85cb1543b0f323fbe (patch)
treee6bebeffd68b6cb10756ddfd862c53097b423358 /glfw.spec
parentd078aca5f81a59f62e6618fc3e0fe7ee0e79058c (diff)
automatic import of glfw
Diffstat (limited to 'glfw.spec')
-rw-r--r--glfw.spec83
1 files changed, 83 insertions, 0 deletions
diff --git a/glfw.spec b/glfw.spec
new file mode 100644
index 0000000..7db7f1f
--- /dev/null
+++ b/glfw.spec
@@ -0,0 +1,83 @@
+# topdir: glfw-3.6.0
+Name: glfw
+Version: 3.6.0
+Release: 1%{?dist}
+Summary: A multi-platform library for OpenGL, OpenGL ES and Vulkan application development
+
+License: zlib
+URL: https://www.glfw.org/
+# Pinned to the exact commit built from (no git tag at this version); local
+# source tarball is created with topdir glfw-VERSION for reproducible prep.
+Source0: https://github.com/glfw/glfw/archive/92dcf4ce74f2e2554a98fea09be7c705c17daa5a.tar.gz#/glfw-%{version}.tar.gz
+
+Group: Development/Libraries
+Packager: openEuler Builder <builder@openeuler.org>
+
+BuildRequires: cmake
+BuildRequires: gcc
+# X11 backend (GLFW_BUILD_X11 default ON)
+BuildRequires: libX11-devel
+BuildRequires: libXrandr-devel
+BuildRequires: libXinerama-devel
+BuildRequires: libXcursor-devel
+BuildRequires: libXi-devel
+BuildRequires: libXext-devel
+# Wayland backend (GLFW_BUILD_WAYLAND default ON) - wayland-devel provides
+# wayland-client/cursor/egl and the wayland-scanner binary; xkbcommon for input.
+# Protocol XML files are bundled in deps/wayland/, so wayland-protocols is not
+# required. EpollShim is only looked up on non-Linux and skipped here.
+BuildRequires: wayland-devel
+BuildRequires: libxkbcommon-devel
+
+%description
+GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
+application development. It provides a simple, platform-independent API for
+creating windows, contexts and surfaces, reading input, handling events, etc.
+GLFW is written primarily in C99 and is licensed under the zlib/libpng license.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Packager: openEuler Builder <builder@openeuler.org>
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files, the development library symlink, CMake integration files and
+pkg-config metadata for %{name}.
+
+%prep
+%autosetup -n %{name}-%{version} -p1
+
+%build
+# Use explicit cmake commands: openEuler 24.03 the cmake macro is in-source
+# (no -B) while the cmake_build macro expects an out-of-tree target-platform
+# directory; explicit -B build / cmake --build / cmake --install avoids the mismatch.
+mkdir -p build
+cmake -B build \
+ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
+ -DCMAKE_INSTALL_LIBDIR=%{_libdir} \
+ -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
+ -DGLFW_LIBRARY_TYPE=SHARED \
+ -DGLFW_BUILD_EXAMPLES=OFF \
+ -DGLFW_BUILD_TESTS=OFF \
+ -DGLFW_BUILD_DOCS=OFF
+cmake --build build %{?_smp_build_ncpus:-j%{_smp_build_ncpus}}
+
+%install
+DESTDIR=%{buildroot} cmake --install build
+
+%files
+%license LICENSE.md
+%doc README.md
+%{_libdir}/libglfw.so.3
+%{_libdir}/libglfw.so.3.*
+
+%files devel
+%{_includedir}/GLFW/
+%{_libdir}/libglfw.so
+%{_libdir}/cmake/glfw3/
+%{_libdir}/pkgconfig/glfw3.pc
+
+%changelog
+* Wed Sep 30 2026 openEuler Builder <builder@openeuler.org> - 3.6.0-1
+- Initial package