json-c/json-c.spec

292 lines
8.3 KiB
RPMSpec
Raw Normal View History

%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
%global so_ver 3
%global reldate 20171207
# Uncomment when building a bootstrap for a bumped so-name.
# You also need to adjust the parameters below.
2017-12-11 00:09:29 +00:00
#global bootstrap 1
%if 0%{?bootstrap}
%global reldate_old 20160607
%global version_old 0.12.1
%global so_ver_old 2
%endif
Name: json-c
2017-12-10 15:02:52 +00:00
Version: 0.13
Release: 5%{?dist}
Summary: JSON implementation in C
License: MIT
URL: https://github.com/%{name}/%{name}
Source0: %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz
%if 0%{?bootstrap}
Source1: %{url}/archive/%{name}-%{version_old}-%{reldate_old}.tar.gz
%endif
# Upstreamed.
Patch0: %{url}/pull/386.patch#/%{name}-0.13_Makefile_add_aclocal_amflags.patch
Patch1: %{url}/commit/94fd101601c24627ae44498a7a73e9f2d9fb6e91.patch#/%{name}-0.13_json_object_add_size_t_json_c_object_sizeof_1.patch
Patch2: %{url}/commit/5b6d62259afbc1709d4437b8c488de429079cae0.patch#/%{name}-0.13_json_object_add_size_t_json_c_object_sizeof_2.patch
Patch3: %{url}/pull/389.patch#/json-c-0.13_json_object_avoid_invalid_free.patch
BuildRequires: libtool
2010-04-08 05:14:21 +00: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}
2010-04-08 05:14:21 +00:00
Requires: %{name}%{?_isa} == %{version}-%{release}
2010-04-08 05:14:21 +00:00
%description devel
2014-07-24 11:22:06 +00:00
This package contains libraries and header files for
developing applications that use %{name}.
2010-04-08 05:14:21 +00:00
%package doc
Summary: Reference manual for json-c
BuildArch: noarch
BuildRequires: doxygen
BuildRequires: hardlink
%description doc
This package contains the reference manual for %{name}.
2010-04-08 05:14:21 +00:00
2010-04-08 05:14:21 +00:00
%prep
%autosetup -Tb 0 -n %{name}-%{name}-%{version}-%{reldate} -p 1
2013-08-24 08:13:01 +00:00
2010-04-08 05:14:21 +00:00
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}
2010-04-08 05:14:21 +00:00
done
%{_bindir}/autoreconf -fiv
%if 0%{?bootstrap}
%{__mkdir} -p bootstrap_ver
pushd bootstrap_ver
%{__tar} --strip-components=1 -xf %{SOURCE1}
%{__grep} -Rl '\-Werror' . | %{_bindir}/xargs %{__sed} -i -e 's!-Werror!!g'
%{_bindir}/autoreconf -fiv
popd
%endif
2010-04-08 05:14:21 +00:00
%build
%configure \
--disable-silent-rules \
--disable-static \
--enable-rdrand \
--enable-shared \
--enable-threading
2014-07-28 11:36:48 +00:00
%make_build
2010-04-08 05:14:21 +00:00
%{_bindir}/doxygen Doxyfile
%if 0%{?bootstrap}
pushd bootstrap_ver
%configure \
--disable-rpath \
--disable-silent-rules \
--disable-static \
--enable-rdrand \
--enable-shared
%make_build
popd
%endif
2010-04-08 05:14:21 +00:00
%install
%if 0%{?bootstrap}
%make_install -C bootstrap_ver
rm -fr %{buildroot}%{_includedir}/%{name} \
%{buildroot}%{_libdir}/lib%{name}.so \
%{buildroot}%{_libdir}/pkgconfig
%endif
2014-07-24 11:22:06 +00:00
%make_install
%{_bindir}/find %{buildroot} -name '*.a' -delete -print
%{_bindir}/find %{buildroot} -name '*.la' -delete -print
%{__mkdir} -p %{buildroot}%{_pkgdocdir}
%{__cp} -pr doc/html ChangeLog README README.* %{buildroot}%{_pkgdocdir}
%{_sbindir}/hardlink -cvf %{buildroot}%{_pkgdocdir}
%check
%make_build check
%if 0%{?bootstrap}
%make_build -C bootstrap_ver check
%endif
2014-07-25 02:59:20 +00:00
%pretrans devel -p <lua>
path = "%{_includedir}/%{name}"
2014-07-25 02:59:20 +00:00
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
2010-04-08 05:14:21 +00:00
%post -p /sbin/ldconfig
2014-07-24 11:22:06 +00:00
%postun -p /sbin/ldconfig
2010-04-08 05:14:21 +00:00
%files
%doc %dir %{_pkgdocdir}
%license AUTHORS
2014-07-12 22:25:01 +00:00
%license COPYING
%{_libdir}/lib%{name}.so.%{so_ver}*
%if 0%{?bootstrap}
%{_libdir}/lib%{name}.so.%{so_ver_old}*
%endif
2010-04-08 05:14:21 +00:00
%files devel
%doc %dir %{_pkgdocdir}
%doc %{_pkgdocdir}/ChangeLog
%doc %{_pkgdocdir}/README*
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
2010-04-08 05:14:21 +00:00
%files doc
%if 0%{?fedora} || 0%{?rhel} >= 7
%license %{_datadir}/licenses/%{name}*
%endif # 0%%{?fedora} || 0%%{?rhel} >= 7
%doc %{_pkgdocdir}
2010-04-08 05:14:21 +00:00
%changelog
* Thu Dec 14 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-5
- Update patch fixing a segfault caused by possible invalid frees
* Wed Dec 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-4
- Add upstream patch fixing invalid free in some cases
* Wed Dec 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-3
- Add upstream patch for adding size_t json_c_object_sizeof()
- Enable partial multi-threaded support
2017-12-11 14:09:49 +00:00
* Mon Dec 11 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-2
- Drop json_object_private.h
2017-12-11 00:09:29 +00:00
* Mon Dec 11 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-1
- New upstream release (rhbz#1524155)
* Sun Dec 10 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-0.1
- Bootstrapping for so-name bump
- Keep json_object_private.h
2017-12-10 15:02:52 +00:00
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 03 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-2
- Add patch to replace obsolete autotools macro
* Thu Apr 27 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-1
- Update to new upstream release
- Introduces SONAME bump, that should have been in 0.12 already
- Unify %%doc
- General spec-file cleanup
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2014-07-29 01:20:08 +00:00
* Tue Jul 29 2014 Christopher Meng <rpm@cicku.me> - 0.12-4
- SONAME bump postponed.
2014-07-28 11:36:48 +00:00
* Mon Jul 28 2014 Christopher Meng <rpm@cicku.me> - 0.12-3
- SONAME bump, see bug 1123785
2014-07-25 03:15:46 +00:00
* Fri Jul 25 2014 Christopher Meng <rpm@cicku.me> - 0.12-2
- NVR bump
2014-07-24 11:22:06 +00:00
* Thu Jul 24 2014 Christopher Meng <rpm@cicku.me> - 0.12-1
- Update to 0.12
2014-07-12 22:25:01 +00:00
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 0.11-8
- fix license handling
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-04-09 17:15:14 +00:00
* Wed Apr 09 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-7
- Address CVE-2013-6371 and CVE-2013-6370 (BZ #1085676 and #1085677).
- Enabled rdrand support.
2014-02-10 08:27:01 +00:00
* Mon Feb 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-6
- Bump spec.
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.11-5
- Run test suite during build.
- Drop empty NEWS from docs.
* Tue Sep 10 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-4
- Remove default warning flags so that package builds on EPEL as well.
2013-08-24 08:13:01 +00:00
* Sat Aug 24 2013 Remi Collet <remi@fedoraproject.org> - 0.11-3
- increase parser strictness for php
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Apr 29 2013 Remi Collet <remi@fedoraproject.org> - 0.11-1
- update to 0.11
- fix source0
- enable both json and json-c libraries
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-2
- Compile and install json_object_iterator using Remi Collet's fix (BZ #879771).
2012-11-24 13:07:01 +00:00
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-1
- Update to 0.10 (BZ #879771).
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Mon Jan 23 2012 Jiri Pirko <jpirko@redhat.com> - 0.9-4
- add json_tokener_parse_verbose, and return NULL on parser errors
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2010-04-08 05:14:21 +00:00
* Tue Apr 06 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.9-1
- First release.