%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} %global so_ver 4 %global reldate 20180305 Name: json-c Version: 0.13.1 Release: 8 Summary: JSON implementation in C License: MIT URL: https://github.com/%{name}/%{name} Source0: %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz # Cherry-picked from upstream. Patch0: %{url}/commit/da4b34355da023c439e96bc6ca31886cd69d6bdb.patch#/%{name}-0.13.1-parse_test_UTF8_BOM.patch Patch1: %{url}/commit/f8c632f579c71012f9aca81543b880a579f634fc.patch#/%{name}-0.13.1-fix_incorrect_casts_in_calls_to_ctype_functions.patch Patch2: %{url}/commit/8bd62177e796386fb6382db101c90b57b6138afe.patch#/%{name}-0.13.1-fix_typos.patch Patch6000: 0012-json_object_private-Use-unsigned-32-bit-integer-type.patch Patch6001: 0040-Fixed-misalignment-in-JSON-string-due-to-space-after.patch Patch6002: 0048-json_object.c-set-errno-in-json_object_get_double.patch Patch6003: 0053-Fix-compiler-warnings.patch Patch6004: 0002-Issue-486-append-a-missing-.0-to-negative-double-val.patch Patch9000: bugfix-json-c-support_aarch64.patch Patch6005: json-c-bugfix-against-INT64_MAX.patch Patch6006: CVE-2020-12762.patch BuildRequires: libtool %description JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects. It aims to conform to RFC 7159. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} == %{version}-%{release} %description devel This package contains libraries and header files for developing applications that use %{name}. %package help Summary: Reference manual for json-c BuildArch: noarch BuildRequires: doxygen hardlink Provides: %{name}-doc = %{version}-%{release} Obsoletes: %{name}-doc = %{version}-%{release} %description help This package contains the reference manual for %{name}. %prep %autosetup -Tb 0 -n %{name}-%{name}-%{version}-%{reldate} -p 1 for doc in ChangeLog; do %{_bindir}/iconv -f iso-8859-1 -t utf8 ${doc} > ${doc}.new /bin/touch -r ${doc} ${doc}.new %{__mv} -f ${doc}.new ${doc} done %{__sed} -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am %{_bindir}/autoreconf -fiv %build %configure --disable-silent-rules --disable-static --enable-rdrand \ --enable-shared --enable-threading %make_build %{_bindir}/doxygen Doxyfile %install %make_install %delete_la_and_a %{__mkdir} -p %{buildroot}%{_pkgdocdir} %{__cp} -pr doc/html ChangeLog README README.* %{buildroot}%{_pkgdocdir} hardlink -cvf %{buildroot}%{_pkgdocdir} %pretrans devel -p path = "%{_includedir}/%{name}" st = posix.stat(path) if st and st.type == "link" then os.remove(path) end %ldconfig_scriptlets %files %license AUTHORS COPYING %{_libdir}/lib%{name}.so.%{so_ver}* %files devel %{_includedir}/%{name}/ %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %files help %doc %{_pkgdocdir} %changelog * Mon Jul 21 2020 wangye - 0.13.1-8 - fix hardlink path * Fri May 22 2020 ruanweidong - 0.13.1-7 - fix CVE-2020-12762 * Sat Mar 21 2020 songnannan - 0.13.1-6 - delete the check * Tue Mar 3 2020 songnannan - 0.13.1-5 - bugfix in oss-fuzz * Thu Sep 19 2019 openEuler Buildteam - 0.13.1-4 - Package init