blob: 1f8942a67736ab925ac2301b5946989e3028b46f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# topdir: nlohmann-json-3.12.0 (after tar --transform)
%global debug_package %{nil}
Name: nlohmann-json
Version: 3.12.0
Release: 2%{?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
BuildRequires: gcc-c++
BuildRequires: make
%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
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
make %{?_smp_mflags}
%install
cd build
make install DESTDIR=%{buildroot}
%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-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
|