%define major 2 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Name: tinygltf Version: 2.9.2 Release: %mkrel 1 Summary: Header only C++11 tiny glTF 2.0 library License: MIT Group: System/Libraries URL: https://github.com/syoyo/tinygltf Source0: https://github.com/syoyo/tinygltf/archive/v%{version}/%{name}-%{version}.tar.gz Source1: stb.pc Patch1: 0001-Fix-build-system.patch Patch2: 0002-Fix-third-party-includes.patch Patch3: 0003-Integrate-unit-tests-into-CMake-build.patch Patch4: 0004-Add-pkgconfig-file.patch Patch5: 0005-Hide-nlohmann_json-symbols.patch Patch6: 0006-Big-endian-fix.patch BuildRequires: cmake BuildRequires: cmake(nlohmann_json) BuildRequires: stbi-devel %description glTF loader and saver library. glTF (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. TinyGLTF is a C++ implementation to load and save glTF data. #------------------------------------------------ %package -n %{libname} Summary: Header only C++11 tiny glTF 2.0 library Group: System/Libraries %description -n %{libname} glTF loader and saver library. glTF (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. TinyGLTF is a C++ implementation to load and save glTF data. #------------------------------------------------ %package -n %{develname} Summary: Development package for %{name} Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} glTF loader and saver library - header files glTF (GL Transmission Format) is a royalty-free specification for the efficient transmission and loading of 3D scenes and models by applications. TinyGLTF is a C++ implementation to load and save glTF data. This package installs header files for development with %{name}. #------------------------------------------------ %prep %autosetup -p1 # Install stub pkgconfig file mkdir -p pkgconfig cp %{SOURCE1} pkgconfig/stb.pc %build export PKG_CONFIG_PATH=$(pwd)/pkgconfig$PKG_CONFIG_PATH %cmake \ -DBUILD_TESTING=OFF \ -DTINYGLTF_VERSION=%{version} \ -DTINYGLTF_SOVERSION=%{major} \ -DTINYGLTF_BUILD_LOADER_EXAMPLE=OFF \ -DTINYGLTF_BUILD_GL_EXAMPLES=OFF \ -DTINYGLTF_BUILD_VALIDATOR_EXAMPLE=OFF %cmake_build %install %cmake_install %files -n %{libname} %doc README.md %license LICENSE %{_libdir}/lib%{name}.so.%{major}{,.*} %files -n %{develname} %doc README.md %license LICENSE %{_includedir}/* %{_libdir}/lib%{name}.so %{_libdir}/cmake/TinyGLTF/ %{_libdir}/pkgconfig/%{name}.pc %changelog * Tue Aug 06 2024 daviddavid 2.9.2-1.mga10 + Revision: 2083829 - new version: 2.9.2 * Fri Jan 19 2024 daviddavid 2.8.19-1.mga10 + Revision: 2032177 - new version: 2.8.19 * Tue Dec 05 2023 daviddavid 2.8.18-2.mga10 + Revision: 2013507 - fix bogus dependency on lib sub-pkg * Mon Dec 04 2023 daviddavid 2.8.18-1.mga10 + Revision: 2013091 - initial package tinygltf (mga#31751)