2019-09-30 10:54:03 -04:00
|
|
|
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
%global so_ver 5
|
|
|
|
|
%global reldate 20200726
|
2019-09-30 10:54:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: json-c
|
2021-09-14 11:34:28 +08:00
|
|
|
Version: 0.15
|
2022-03-25 11:34:15 +08:00
|
|
|
Release: 2
|
2019-09-30 10:54:03 -04:00
|
|
|
Summary: JSON implementation in C
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/%{name}/%{name}
|
|
|
|
|
Source0: %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz
|
|
|
|
|
|
2022-03-25 11:34:15 +08:00
|
|
|
BuildRequires: cmake gcc ninja-build
|
2019-09-30 10:54:03 -04:00
|
|
|
|
|
|
|
|
%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
|
2021-09-14 11:34:28 +08:00
|
|
|
%autosetup -n %{name}-%{name}-%{version}-%{reldate} -p 1
|
|
|
|
|
|
|
|
|
|
# Remove pre-built html documentation.
|
|
|
|
|
rm -fr doc/html
|
|
|
|
|
|
|
|
|
|
# Update Doxyfile.
|
|
|
|
|
doxygen -s -u doc/Doxyfile.in
|
|
|
|
|
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
%build
|
2021-09-14 11:34:28 +08:00
|
|
|
%cmake \
|
|
|
|
|
-DBUILD_STATIC_LIBS:BOOL=OFF \
|
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
|
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING="" \
|
|
|
|
|
-DDISABLE_BSYMBOLIC:BOOL=OFF \
|
|
|
|
|
-DDISABLE_WERROR:BOOL=ON \
|
|
|
|
|
-DENABLE_RDRAND:BOOL=ON \
|
|
|
|
|
-DENABLE_THREADING:BOOL=ON \
|
|
|
|
|
-G Ninja\
|
|
|
|
|
%{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \
|
|
|
|
|
%{!?__cmake_in_source_build:-B "%{_vpath_builddir}"} \
|
|
|
|
|
|
|
|
|
|
%__cmake --build "%{_vpath_builddir}" %{?_smp_mflags} --verbose --target all doc
|
|
|
|
|
#%cmake_build
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
%install
|
2021-09-14 11:34:28 +08:00
|
|
|
#%cmake_install
|
|
|
|
|
DESTDIR="%{buildroot}" %__cmake --install "%{_vpath_builddir}"
|
2019-09-30 10:54:03 -04:00
|
|
|
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
|
|
|
hardlink -cfv %{buildroot}%{_pkgdocdir}
|
2019-09-30 10:54:03 -04:00
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license AUTHORS COPYING
|
|
|
|
|
%{_libdir}/lib%{name}.so.%{so_ver}*
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_includedir}/%{name}/
|
2021-09-14 11:34:28 +08:00
|
|
|
%{_libdir}/cmake/%{name}
|
2019-09-30 10:54:03 -04:00
|
|
|
%{_libdir}/lib%{name}.so
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%doc %{_pkgdocdir}
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-03-25 11:34:15 +08:00
|
|
|
* Fri Mar 25 2022 wuchaochao <cyanrose@yeah.net> - 0.15-2
|
|
|
|
|
- move json-c
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
* Tue Sep 14 2021 hanhui <hanhui15@huawei.com> - 0.15-1
|
|
|
|
|
- update to 0.15
|
|
|
|
|
|
2021-09-09 11:43:17 +08:00
|
|
|
* Thu Sep 9 2021 liuyumeng <liuyumeng5@huawei.com> - 0.13.1-9
|
|
|
|
|
- fix broken RDRAND causes infinite looping
|
|
|
|
|
|
|
|
|
|
* Tue Jul 21 2020 wangye <wangye70@huawei.com> - 0.13.1-8
|
2020-07-21 09:14:54 +08:00
|
|
|
- fix hardlink path
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
* Fri May 22 2020 ruanweidong <ruanweidong1@huawei.com> -0.13.1-7
|
2020-05-22 11:48:59 +08:00
|
|
|
- fix CVE-2020-12762
|
|
|
|
|
|
2020-03-21 20:19:49 +08:00
|
|
|
* Sat Mar 21 2020 songnannan <songnannan2@huawei.com> - 0.13.1-6
|
|
|
|
|
- delete the check
|
|
|
|
|
|
2020-03-03 17:22:14 +08:00
|
|
|
* Tue Mar 3 2020 songnannan<songnannan2@huawei.com> - 0.13.1-5
|
|
|
|
|
- bugfix in oss-fuzz
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
* Thu Sep 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.13.1-4
|
|
|
|
|
- Package init
|