summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-10-13 07:33:59 +0000
committerCoprDistGit <infra@openeuler.org>2026-10-13 07:33:59 +0000
commit6a3b1353ac53fd0601431c0eeb0cc21fd3ef4ef7 (patch)
tree3b839ca009e44507ed07680f076231602e51177c
parent4915de4d4a6dcbe4d1e007fc6dbe6b062a528d60 (diff)
automatic import of nlohmann-json
-rw-r--r--.gitignore1
-rw-r--r--nlohmann-json.spec60
-rw-r--r--sources1
3 files changed, 62 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..bb93cb4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/nlohmann-json-3.12.0.tar.gz
diff --git a/nlohmann-json.spec b/nlohmann-json.spec
new file mode 100644
index 0000000..d3ba6d8
--- /dev/null
+++ b/nlohmann-json.spec
@@ -0,0 +1,60 @@
+# topdir: nlohmann-json-3.12.0 (after tar --transform)
+%global debug_package %{nil}
+
+Name: nlohmann-json
+Version: 3.12.0
+Release: 1%{?dist}
+Summary: JSON for Modern C++
+
+License: MIT
+URL: https://github.com/nlohmann/json
+Source0: https://github.com/nlohmann/json/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
+
+Group: Development/Libraries
+Packager: openEuler Builder <builder@openeuler.org>
+BuildArch: noarch
+
+BuildRequires: cmake
+BuildRequires: gcc-c++
+
+%description
+nlohmann-json is a header-only JSON library for Modern C++ (C++11 and
+above). It provides an intuitive syntax, trivial integration, strict
+mapping to JSON, and high performance. The entire library is contained
+in a single header file, with no external dependencies.
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Packager: openEuler Builder <builder@openeuler.org>
+Provides: %{name}-static = %{version}-%{release}
+BuildArch: noarch
+
+%description devel
+Header files and CMake integration files for %{name}.
+This is a header-only library; no runtime package is needed.
+
+%prep
+%autosetup -p1
+
+%build
+%cmake \
+ -DJSON_BuildTests=OFF \
+ -DJSON_ImplicitConversions=ON \
+ -DJSON_Install=ON \
+ -DJSON_MultipleHeaders=ON
+%cmake_build
+
+%install
+%cmake_install
+
+%files devel
+%license LICENSE.MIT
+%doc README.md ChangeLog.md
+%{_includedir}/nlohmann/
+%{_datadir}/cmake/nlohmann_json/
+%{_datadir}/pkgconfig/nlohmann_json.pc
+
+%changelog
+* Tue Oct 13 2026 openEuler Builder <builder@openeuler.org> - 3.12.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..138c6cd
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+62a0888e5dfa92f15094b2de12213818 nlohmann-json-3.12.0.tar.gz