diff options
author | CoprDistGit <infra@openeuler.org> | 2025-08-06 12:51:13 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-08-06 12:51:13 +0000 |
commit | 3a7157e851760fdce8ba05b9ca5b9e105f1c38bb (patch) | |
tree | 184f70f368cc90a3e3813ebc9a5c27a8fb0d891b | |
parent | a8df3f6edc0a9eebca4c3368e5fc0dcb9e9a4be6 (diff) |
automatic import of jsonopeneuler25.03
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | json.spec | 70 | ||||
-rw-r--r-- | sources | 2 |
3 files changed, 74 insertions, 0 deletions
@@ -0,0 +1,2 @@ +/json-3.11.3.tar.gz +/json_test_data-3.1.0.tar.gz diff --git a/json.spec b/json.spec new file mode 100644 index 0000000..af614cc --- /dev/null +++ b/json.spec @@ -0,0 +1,70 @@ +%global debug_package %{nil} +%global test_data_version 3.1.0 +%global bundled_hedley_version 15 + +Name: json +Version: 3.11.3 +Release: 1 + +# The entire source is MIT except +# include/nlohmann/thirdparty/hedley/hedley.hpp, which is CC0-1.0 +License: MIT AND CC0-1.0 +Summary: JSON for Modern C++ +URL: https://github.com/nlohmann/%{name} +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +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++ +BuildRequires: ninja-build + +# Build requirements for the tests. +BuildRequires: doctest-devel +BuildRequires: gawk + +%description +This is a packages version of the nlohmann/json header-only C++ +library available at Github. + +%package devel +Summary: Development files for %{name} +Provides: %{name}-static = %{?epoch:%{epoch}:}%{version}-%{release} +# This package is also known as nlohmann-json, provide some alternate names +# to make it easier to find +Provides: nlohmann-json-devel = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: nlohmann-json-static = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: nlohmann_json-devel = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: nlohmann_json-static = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: bundled(hedley) = %{bundled_hedley_version} +Requires: libstdc++-devel%{?_isa} + +%description devel +The %{name}-devel package contains C++ header files for developing +applications that use %{name}. + +%prep +%autosetup -p1 +%setup -q -D -T -a1 + +# Unbundle doctest. Used only in tests. +ln -svf %{_includedir}/doctest/doctest.h ./tests/thirdparty/doctest/doctest.h + +%build +%cmake \ + -DJSON_BuildTests:BOOL=OFF \ + -DJSON_Install:BOOL=ON \ + -DJSON_TestDataDirectory:STRING=json_test_data-%{test_data_version} \ + -DJSON_MultipleHeaders:BOOL=ON +%make_build + +%install +%make_install + +%files devel +%doc README.md +%license LICENSE.MIT +%{_includedir}/nlohmann/ +%{_datadir}/cmake/nlohmann_json/ +%{_datadir}/pkgconfig/nlohmann_json.pc + +%changelog @@ -0,0 +1,2 @@ +d603041cbc6051edbaa02ebb82cf0aa9 json-3.11.3.tar.gz +99667cb7c117f998cf9e58ab0dc05389 json_test_data-3.1.0.tar.gz |