Name: nlohmann-json Version: 3.11.2 Release: %autorelease Summary: Header-only C++ JSON library License: MIT URL: https://github.com/nlohmann/json Source0: https://github.com/nlohmann/json/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz # Test data for tests stored in a separate repo for efficiency. %global test_data_version 3.1.0 Source1: https://github.com/nlohmann/json_test_data/archive/v%{test_data_version}/json_test_data-%{test_data_version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ # The sole output subpackage is noarch, but we want to run the tests # on all architectures, so the build is archful. # There is no compiled code, so no debug package should be generated. %global debug_package %{nil} %description %{summary}. %package devel Summary: %{summary} # Hedley is another simple header-only library. The bundled copy is modified # and ripping it out seems too complicated to be worth the trouble. Provides: bundled(hedley) = 15 BuildArch: noarch %description devel %{summary}. This package contains the header files. %prep %autosetup -n json-%{version} -p1 tar -xvf %{SOURCE1} --one-top-level=json_test_data --strip-components=1 # Drop test cases that doesn't compile with g++-13, # e.g. lots of errors about missing operator==. # At least unit-regression2.cpp is fixed upstream, so revisit this list # when updating. rm tests/src/unit-allocator.cpp rm tests/src/unit-iterators2.cpp rm tests/src/unit-regression2.cpp %build %cmake %cmake_build ln -sv --relative json_test_data %__cmake_builddir/ %install %cmake_install %check %ctest -E '_fetch_' %files devel %_includedir/nlohmann/ %{_datadir}/pkgconfig/nlohmann_json.pc %{_datadir}/cmake/nlohmann_json %changelog %autochangelog