summaryrefslogtreecommitdiff
path: root/nlohmann-json.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-10-13 07:47:29 +0000
committerCoprDistGit <infra@openeuler.org>2026-10-13 07:47:29 +0000
commita290da144cccb164c7b66741058b5979047b9926 (patch)
tree52c500a616450215a6188896495c4a04caf1782a /nlohmann-json.spec
parent6a3b1353ac53fd0601431c0eeb0cc21fd3ef4ef7 (diff)
automatic import of nlohmann-jsonopeneuler24.03_LTS_SP3
Diffstat (limited to 'nlohmann-json.spec')
-rw-r--r--nlohmann-json.spec21
1 files changed, 17 insertions, 4 deletions
diff --git a/nlohmann-json.spec b/nlohmann-json.spec
index d3ba6d8..1f8942a 100644
--- a/nlohmann-json.spec
+++ b/nlohmann-json.spec
@@ -3,7 +3,7 @@
Name: nlohmann-json
Version: 3.12.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: JSON for Modern C++
License: MIT
@@ -15,7 +15,9 @@ Packager: openEuler Builder <builder@openeuler.org>
BuildArch: noarch
BuildRequires: cmake
+BuildRequires: gcc
BuildRequires: gcc-c++
+BuildRequires: make
%description
nlohmann-json is a header-only JSON library for Modern C++ (C++11 and
@@ -38,15 +40,21 @@ This is a header-only library; no runtime package is needed.
%autosetup -p1
%build
-%cmake \
+mkdir build
+cd build
+cmake .. \
+ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \
+ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
-DJSON_BuildTests=OFF \
-DJSON_ImplicitConversions=ON \
-DJSON_Install=ON \
-DJSON_MultipleHeaders=ON
-%cmake_build
+make %{?_smp_mflags}
%install
-%cmake_install
+cd build
+make install DESTDIR=%{buildroot}
%files devel
%license LICENSE.MIT
@@ -56,5 +64,10 @@ This is a header-only library; no runtime package is needed.
%{_datadir}/pkgconfig/nlohmann_json.pc
%changelog
+* Tue Oct 13 2026 openEuler Builder <builder@openeuler.org> - 3.12.0-2
+- Fix %%build/%%install: replace incompatible %%cmake/%%cmake_build/%%cmake_install
+ macros with explicit cmake commands (old-style %%cmake does in-source build
+ but %%cmake_build expects %%_vpath_builddir directory)
+
* Tue Oct 13 2026 openEuler Builder <builder@openeuler.org> - 3.12.0-1
- Initial package