|
|
2c2b1b |
%global reldate 20130402
|
|
|
2c2b1b |
|
|
|
2c2b1b |
Name: json-c
|
|
|
2c2b1b |
Version: 0.11
|
|
|
2c2b1b |
Release: 4%{?dist}
|
|
|
2c2b1b |
Summary: A JSON implementation in C
|
|
|
2c2b1b |
Group: Development/Libraries
|
|
|
2c2b1b |
License: MIT
|
|
|
2c2b1b |
URL: https://github.com/json-c/json-c/wiki
|
|
|
2c2b1b |
Source0: https://github.com/json-c/json-c/archive/json-c-%{version}-%{reldate}.tar.gz
|
|
|
2c2b1b |
|
|
|
2c2b1b |
Patch0: json-c-CVE-2013-6371.patch
|
|
|
2c2b1b |
|
|
|
2c2b1b |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
|
|
2c2b1b |
BuildRequires: libtool
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%description
|
|
|
2c2b1b |
JSON-C implements a reference counting object model that allows you to easily
|
|
|
2c2b1b |
construct JSON objects in C, output them as JSON formatted strings and parse
|
|
|
2c2b1b |
JSON formatted strings back into the C representation of JSON objects.
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%package devel
|
|
|
2c2b1b |
Summary: Development headers and library for json-c
|
|
|
2c2b1b |
Group: Development/Libraries
|
|
|
2c2b1b |
Requires: %{name} = %{version}-%{release}
|
|
|
2c2b1b |
Requires: pkgconfig
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%description devel
|
|
|
2c2b1b |
This package contains the development headers and library for json-c.
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%package doc
|
|
|
2c2b1b |
Summary: Reference manual for json-c
|
|
|
2c2b1b |
Group: Documentation
|
|
|
2c2b1b |
%if 0%{?fedora} > 10 || 0%{?rhel}>5
|
|
|
2c2b1b |
BuildArch: noarch
|
|
|
2c2b1b |
%endif
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%description doc
|
|
|
2c2b1b |
This package contains the reference manual for json-c.
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%prep
|
|
|
2c2b1b |
%setup -q -n json-c-json-c-%{version}-%{reldate}
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%patch0 -p1 -b .cve20136371
|
|
|
2c2b1b |
|
|
|
2c2b1b |
for doc in ChangeLog; do
|
|
|
2c2b1b |
iconv -f iso-8859-1 -t utf8 $doc > $doc.new &&
|
|
|
2c2b1b |
touch -r $doc $doc.new &&
|
|
|
2c2b1b |
mv $doc.new $doc
|
|
|
2c2b1b |
done
|
|
|
2c2b1b |
|
|
|
2c2b1b |
# regenerate auto stuff to avoid rpath issue
|
|
|
2c2b1b |
autoreconf -fi
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%build
|
|
|
2c2b1b |
%configure \
|
|
|
2c2b1b |
--enable-shared \
|
|
|
2c2b1b |
--disable-static \
|
|
|
2c2b1b |
--disable-rpath \
|
|
|
2c2b1b |
--enable-rdrand
|
|
|
2c2b1b |
# parallel build is broken for now, make %{?_smp_mflags}
|
|
|
2c2b1b |
make
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%install
|
|
|
2c2b1b |
rm -rf %{buildroot}
|
|
|
2c2b1b |
make install DESTDIR=%{buildroot}
|
|
|
2c2b1b |
|
|
|
2c2b1b |
# Get rid of la files
|
|
|
2c2b1b |
rm -rf %{buildroot}%{_libdir}/*.la
|
|
|
2c2b1b |
|
|
|
2c2b1b |
# yum cannot replace a dir by a link
|
|
|
2c2b1b |
# so switch the dir names
|
|
|
2c2b1b |
rm %{buildroot}%{_includedir}/json
|
|
|
2c2b1b |
mv %{buildroot}%{_includedir}/json-c \
|
|
|
2c2b1b |
%{buildroot}%{_includedir}/json
|
|
|
2c2b1b |
ln -s json \
|
|
|
2c2b1b |
%{buildroot}%{_includedir}/json-c
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%check
|
|
|
2c2b1b |
make check
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%clean
|
|
|
2c2b1b |
rm -rf %{buildroot}
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%post -p /sbin/ldconfig
|
|
|
2c2b1b |
%postun -p /sbin/ldconfig
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%files
|
|
|
2c2b1b |
%defattr(-,root,root,-)
|
|
|
2c2b1b |
%doc AUTHORS ChangeLog COPYING NEWS README README.html
|
|
|
2c2b1b |
%{_libdir}/libjson.so.*
|
|
|
2c2b1b |
%{_libdir}/libjson-c.so.*
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%files devel
|
|
|
2c2b1b |
%defattr(-,root,root,-)
|
|
|
2c2b1b |
%{_includedir}/json
|
|
|
2c2b1b |
%{_includedir}/json-c
|
|
|
2c2b1b |
%{_libdir}/libjson.so
|
|
|
2c2b1b |
%{_libdir}/libjson-c.so
|
|
|
2c2b1b |
%{_libdir}/pkgconfig/json.pc
|
|
|
2c2b1b |
%{_libdir}/pkgconfig/json-c.pc
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%files doc
|
|
|
2c2b1b |
%defattr(-,root,root,-)
|
|
|
2c2b1b |
%doc doc/html/*
|
|
|
2c2b1b |
|
|
|
2c2b1b |
|
|
|
2c2b1b |
%changelog
|
|
|
2c2b1b |
* Wed Apr 9 2014 Remi Collet <remi@fedoraproject.org> - 0.11-4
|
|
|
2c2b1b |
- fix has collision CVE-2013-6371
|
|
|
2c2b1b |
- fix buffer overflow CVE-2013-6370
|
|
|
2c2b1b |
- enable upstream test suite
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.11-3
|
|
|
2c2b1b |
- Mass rebuild 2014-01-24
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.11-2
|
|
|
2c2b1b |
- Mass rebuild 2013-12-27
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Mon Apr 29 2013 Remi Collet <remi@fedoraproject.org> - 0.11-1
|
|
|
2c2b1b |
- update to 0.11
|
|
|
2c2b1b |
- fix source0
|
|
|
2c2b1b |
- enable both json and json-c libraries
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3
|
|
|
2c2b1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-2
|
|
|
2c2b1b |
- Compile and install json_object_iterator using Remi Collet's fix (BZ #879771).
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-1
|
|
|
2c2b1b |
- Update to 0.10 (BZ #879771).
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-5
|
|
|
2c2b1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Mon Jan 23 2012 Jiri Pirko <jpirko@redhat.com> - 0.9-4
|
|
|
2c2b1b |
- add json_tokener_parse_verbose, and return NULL on parser errors
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3
|
|
|
2c2b1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
|
|
|
2c2b1b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
2c2b1b |
|
|
|
2c2b1b |
* Tue Apr 06 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.9-1
|
|
|
2c2b1b |
- First release.
|