diff --git a/files_in_srpm.txt b/files_in_srpm.txt new file mode 100644 index 0000000000000000000000000000000000000000..a41052c4a00bb3def092be1fdace8bce1b957d84 --- /dev/null +++ b/files_in_srpm.txt @@ -0,0 +1,2 @@ +yyjson-0.10.0.tar.gz +yyjson.spec diff --git a/yyjson-0.10.0.tar.gz b/yyjson-0.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5989f52ef9ca6b09b6cacd5e9a6aec753e4052e7 Binary files /dev/null and b/yyjson-0.10.0.tar.gz differ diff --git a/yyjson.spec b/yyjson.spec new file mode 100644 index 0000000000000000000000000000000000000000..33f3bc31e655088a46d96ac2bb77742f65a6d777 --- /dev/null +++ b/yyjson.spec @@ -0,0 +1,75 @@ +%global forgeurl https://github.com/ibireme/yyjson +%global __cmake_in_source_build 1 +Version: 0.10.0 +%global tag %{version} +%forgemeta + +Name: yyjson +Release: 1 +Summary: A high performance JSON library written in ANSI C +License: MIT +URL: %{forgeurl} +Source0: %{forgesource} + +BuildRequires: gcc-c++ +BuildRequires: cmake +BuildRequires: ninja-build + +%description +A high performance JSON library written in ANSI C. + +Features +- Fast: can read or write gigabytes per second JSON data on modern CPUs. +- Portable: complies with ANSI C (C89) for cross-platform compatibility. +- Strict: complies with RFC 8259 JSON standard, ensuring strict number format +and UTF-8 validation. +- Extendable: offers options to allow comments, trailing commas, NaN/Inf, and +custom memory allocator. +- Accuracy: can accurately read and write int64, uint64, and double numbers. +- Flexible: supports unlimited JSON nesting levels, \u0000 characters, and non +null-terminated strings. +- Manipulation: supports querying and modifying using JSON Pointer, JSON Patch +and JSON Merge Patch. +- Developer-Friendly: easy integration with only one h and one c file. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains development files for %{name}. + +%prep +%forgeautosetup -p1 + +# https://github.com/ibireme/yyjson/issues/154 +sed -i '/-Werror/d' CMakeLists.txt + +%build +%cmake \ + -GNinja \ + -DCMAKE_BUILD_TYPE=Release \ + -DYYJSON_BUILD_TESTS=ON \ + +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/libyyjson.so.0* + +%files devel +%{_includedir}/yyjson.h +%{_libdir}/libyyjson.so +%{_libdir}/cmake/yyjson/ +%{_libdir}/pkgconfig/yyjson.pc + +%changelog +* Thu Jan 9 2025 lichaoran - 0.10.0-1 +- Init package diff --git a/yyjson.src.rpm b/yyjson.src.rpm new file mode 100644 index 0000000000000000000000000000000000000000..4928f77b3d00c46d48c9d9cee5bf8fd22992e598 Binary files /dev/null and b/yyjson.src.rpm differ