From e4621de9ac0214b8af67e2ce35a09b35355f88a7 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 4 Nov 2024 20:02:27 +0800 Subject: [PATCH] adopt to new cmake macro --- yajl.spec | 46 +++++++++++++++++++++------------------------- yajl.yaml | 2 +- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/yajl.spec b/yajl.spec index 6f12232..48e3571 100644 --- a/yajl.spec +++ b/yajl.spec @@ -1,6 +1,9 @@ +%undefine __cmake_in_source_build +%global _vpath_builddir build + Name: yajl Version: 2.1.0 -Release: 20 +Release: 21 Summary: Yet Another JSON Library License: ISC URL: https://github.com/lloyd/yajl @@ -16,7 +19,8 @@ Patch7: 0007-add-cmake-option-for-test-and-binary.patch Patch8: backport-CVE-2022-24795.patch Patch9: yajl-assert-error-when-memory-allocation-failed.patch -BuildRequires: cmake gcc +BuildRequires: gcc +BuildRequires: cmake >= 3.4 %description yajl is a small event-driven JSON parser written in ANSI C, and a small @@ -25,6 +29,7 @@ validating JSON generator. %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} +Conflicts: yajl < 2.1.0-21 %description devel This package provides the libraries and includes @@ -34,43 +39,34 @@ necessary for developing against the yajl library. %autosetup -n %{name}-%{version} -p1 %build -mkdir build -cd build -%cmake .. -%make_build VERBOSE=1 +%cmake +%cmake_build %install -rm -rf $RPM_BUILD_ROOT -cd build -%make_install +%cmake_install %check -cd test/parsing -./run_tests.sh -cd ../api -./run_tests.sh +cd test +(cd parsing && ./run_tests.sh) +(cd api && ./run_tests.sh) %files -%defattr(-,root,root) -%doc COPYING README ChangeLog TODO +%license COPYING +%doc README ChangeLog TODO %{_bindir}/json_reformat %{_bindir}/json_verify - %{_libdir}/libyajl.so.* -%{_libdir}/libyajl.so %files devel -%dir %{_includedir}/yajl -%{_includedir}/yajl/yajl_common.h -%{_includedir}/yajl/yajl_gen.h -%{_includedir}/yajl/yajl_parse.h -%{_includedir}/yajl/yajl_tree.h -%{_includedir}/yajl/yajl_version.h - -%{_libdir}/pkgconfig/yajl.pc +%{_includedir}/yajl +%{_libdir}/libyajl.so %{_libdir}/libyajl_s.a +%{_libdir}/pkgconfig/yajl.pc %changelog +* Mon Nov 04 2024 Funda Wang - 2.1.0-21 +- adopt to new cmake macro + * Wed Nov 16 2022 fuanan - 2.1.0-20 - Modify Source0 diff --git a/yajl.yaml b/yajl.yaml index ec970a3..0d9180b 100644 --- a/yajl.yaml +++ b/yajl.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: "lloyd/yajl" tag_prefix: -seperator: +sparator: -- Gitee