diff --git a/yajl.spec b/yajl.spec index 6f122321df80057c320fc2592a4b85dd9762f3a0..48e35712125c03ebb03eab17be0e722459aae1b2 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 ec970a37b6a7dfe4601863325503d221524da1e1..0d9180b0c3247a096f397383ec67be3f92a7f51c 100644 --- a/yajl.yaml +++ b/yajl.yaml @@ -1,4 +1,4 @@ version_control: github src_repo: "lloyd/yajl" tag_prefix: -seperator: +sparator: