- json-c 0.13.1 * Add const size_t json_c_object_sizeof() * Avoid invalid free (and thus a segfault) when ref_count gets < 0 * Fix handling of custom double formats that include a ".0" * Avoid uninitialized variable warnings in json_object_object_foreach * Add a top level fuzz directory for fuzzers run by OSS-Fuzz * Fix build for certain uClibc based systems. * Bump sonum to 4.0 to avoid conflicts because some packagers made their own bump to ".so.3" for the older 0.12 release OBS-URL: https://build.opensuse.org/request/show/586115 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/json-c?expand=0&rev=31
128 lines
4.0 KiB
RPMSpec
128 lines
4.0 KiB
RPMSpec
#
|
|
# spec file for package json-c
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define libname libjson-c
|
|
%define libsoname %{libname}4
|
|
%define oldlibname libjson
|
|
Name: json-c
|
|
Version: 0.13.1
|
|
Release: 0
|
|
Summary: JSON implementation in C
|
|
License: MIT
|
|
Group: Development/Libraries/C and C++
|
|
Url: https://github.com/json-c/json-c/wiki
|
|
#Git-Clone git://github.com/json-c/json-c
|
|
Source0: https://s3.amazonaws.com/json-c_releases/releases/%{name}-%{version}.tar.gz
|
|
Source1: baselibs.conf
|
|
BuildRequires: fdupes
|
|
BuildRequires: libtool
|
|
BuildRequires: pkgconfig
|
|
|
|
%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.
|
|
|
|
%package -n %{libsoname}
|
|
Summary: JSON-C shared library
|
|
Group: System/Libraries
|
|
|
|
%description -n %{libsoname}
|
|
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.
|
|
|
|
This package includes the JSON library.
|
|
|
|
%package -n %{libname}-devel
|
|
Summary: Development headers and libraries for json-c
|
|
Group: Development/Libraries/C and C++
|
|
Requires: %{libsoname} = %{version}
|
|
Provides: %{oldlibname}-devel = %{version}
|
|
Obsoletes: %{oldlibname}-devel < %{version}
|
|
|
|
%description -n %{libname}-devel
|
|
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.
|
|
|
|
This package includes header files and scripts needed for developers
|
|
using the json-c library
|
|
|
|
%package -n %{libname}-doc
|
|
Summary: Documentation files
|
|
Group: Documentation/Other
|
|
Provides: %{oldlibname}-doc = %{version}
|
|
Obsoletes: %{oldlibname}-doc < %{version}
|
|
%if 0%{?suse_version} >= 1120
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description -n %{libname}-doc
|
|
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.
|
|
|
|
This package includes the json-c documentation.
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
%if 0%{?suse_version} <= 1110
|
|
sed -i 's/-Werror //g' Makefile.am.inc
|
|
autoreconf -fiv
|
|
%endif
|
|
%configure --disable-static --with-pic --disable-oldname-compat
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
make %{?_smp_mflags} check
|
|
|
|
%install
|
|
%make_install
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
|
# create a compatibilty pkg-config file for software needing it
|
|
(cd %{buildroot}%{_libdir}/pkgconfig && ln -s json-c.pc json.pc)
|
|
mkdir -p "%{buildroot}%{_docdir}/%{name}-doc"
|
|
cp -R doc/html "%{buildroot}%{_docdir}/%{name}-doc"
|
|
%fdupes %{buildroot}%{_docdir}
|
|
|
|
%post -n %{libsoname} -p /sbin/ldconfig
|
|
%postun -n %{libsoname} -p /sbin/ldconfig
|
|
|
|
%files -n %{libsoname}
|
|
%{_libdir}/%{libname}.so.*
|
|
%license COPYING
|
|
|
|
%files -n %{libname}-devel
|
|
%{_libdir}/%{libname}.so
|
|
%{_includedir}/json-c
|
|
%{_libdir}/pkgconfig/*.pc
|
|
|
|
%files -n %{libname}-doc
|
|
%license COPYING
|
|
%doc AUTHORS ChangeLog README README.html
|
|
%doc %{_docdir}/%{name}-doc
|
|
|
|
%changelog
|