Blame SPECS/json-c.spec

a0bbcb
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
a0bbcb
a0bbcb
# We don't want accidental SONAME bumps.
a0bbcb
# When there is a SONAME bump in json-c, we need to request
a0bbcb
# a side-tag for bootstrap purposes:
a0bbcb
#
a0bbcb
# 1. Build a bootstrap build of the systemd package, and wait
a0bbcb
#    for it to be available inside the side-tag.
a0bbcb
# 2. Re-build the following build-chain for bootstrap:
a0bbcb
#    json-c : cryptsetup
a0bbcb
# 3. Untag the systemd bootstrap build from the side-tag, and
a0bbcb
#    disable bootstrapping in the systemd package.  Re-build
a0bbcb
#    the systemd package into Rawhide.
a0bbcb
# 4. Wait for the changes to populate and re-build the following
a0bbcb
#    chain into the side-tag:
a0bbcb
#    satyr : libdnf libreport
a0bbcb
# 5. Merge the side-tag using Bodhi.
a0bbcb
#
a0bbcb
# After that procedure any other cosumers can be re-build
a0bbcb
# in Rawhide as usual.
a0bbcb
%global so_ver 5
a0bbcb
a0bbcb
# Releases are tagged with a date stamp.
a0bbcb
%global reldate 20200419
a0bbcb
a0bbcb
a0bbcb
Name:           json-c
a0bbcb
Version:        0.14
a0bbcb
Release:        10%{?dist}
a0bbcb
Summary:        JSON implementation in C
a0bbcb
a0bbcb
License:        MIT
a0bbcb
URL:            https://github.com/%{name}/%{name}
a0bbcb
Source0:        %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz
a0bbcb
a0bbcb
# Cherry-picked from upstream.
a0bbcb
Patch0001:      %{url}/commit/228881c8fc287182f284a58d8279a32fbeae0b7f.patch#/%{name}-0.14-dont_install_config_h.patch
a0bbcb
Patch0002:      %{url}/pull/603.patch#/%{name}-0.14-backport_fixes_from_master.patch
a0bbcb
Patch0003:      %{url}/commit/003b58782b12798da3da8b952152988a88dfb532.patch#/%{name}-0.14-fix_usage_of_errno_in_json_parse_uint64.patch
a0bbcb
Patch0004:      %{url}/pull/618.patch#/%{name}-0.14-test_deep_copy_fix_assertion_value.patch
a0bbcb
Patch0005:      %{url}/pull/619.patch#/%{name}-0.14-cmake_fix_out_of_tree_build_for_Doxygen_documentation.patch
a0bbcb
Patch0006:      %{url}/pull/622.patch#/%{name}-0.14-move_Doxyfile_into_doc_subdir.patch
a0bbcb
Patch0007:      %{url}/commit/4a546e7b2f471157c6f479df1ef687864fcbd89e.patch#/%{name}-0.14-arraylist_optimizations.patch
a0bbcb
a0bbcb
BuildRequires:  cmake
a0bbcb
BuildRequires:  gcc
a0bbcb
BuildRequires:  ninja-build
a0bbcb
%ifarch %{valgrind_arches}
a0bbcb
BuildRequires:  valgrind
a0bbcb
%endif
a0bbcb
a0bbcb
%description
a0bbcb
JSON-C implements a reference counting object model that allows you
a0bbcb
to easily construct JSON objects in C, output them as JSON formatted
a0bbcb
strings and parse JSON formatted strings back into the C representation
a0bbcb
of JSON objects.  It aims to conform to RFC 7159.
a0bbcb
a0bbcb
a0bbcb
%package        devel
a0bbcb
Summary:        Development files for %{name}
a0bbcb
Requires:       %{name}%{?_isa} = %{version}-%{release}
a0bbcb
a0bbcb
%description    devel
a0bbcb
This package contains libraries and header files for
a0bbcb
developing applications that use %{name}.
a0bbcb
a0bbcb
a0bbcb
%package        doc
a0bbcb
Summary:        Reference manual for json-c
a0bbcb
a0bbcb
BuildArch:      noarch
a0bbcb
a0bbcb
BuildRequires:  doxygen
a0bbcb
BuildRequires:  hardlink
a0bbcb
a0bbcb
%description    doc
a0bbcb
This package contains the reference manual for %{name}.
a0bbcb
a0bbcb
a0bbcb
%prep
a0bbcb
%autosetup -n %{name}-%{name}-%{version}-%{reldate} -p 1
a0bbcb
a0bbcb
# Remove pre-built html documentation.
a0bbcb
rm -fr doc/html
a0bbcb
a0bbcb
# Update Doxyfile.
a0bbcb
doxygen -s -u doc/Doxyfile.in
a0bbcb
a0bbcb
a0bbcb
%build
a0bbcb
%cmake \
a0bbcb
  -DBUILD_STATIC_LIBS:BOOL=OFF       \
a0bbcb
  -DCMAKE_BUILD_TYPE:STRING=RELEASE  \
a0bbcb
  -DCMAKE_C_FLAGS_RELEASE:STRING=""  \
a0bbcb
  -DDISABLE_BSYMBOLIC:BOOL=OFF       \
a0bbcb
  -DDISABLE_WERROR:BOOL=ON           \
a0bbcb
  -DENABLE_RDRAND:BOOL=ON            \
a0bbcb
  -DENABLE_THREADING:BOOL=ON         \
a0bbcb
  -G Ninja
a0bbcb
%cmake_build --target all doc
a0bbcb
a0bbcb
a0bbcb
%install
a0bbcb
%cmake_install
a0bbcb
a0bbcb
# Documentation
a0bbcb
mkdir -p %{buildroot}%{_pkgdocdir}
a0bbcb
cp -a %{__cmake_builddir}/doc/html ChangeLog README README.* \
a0bbcb
  %{buildroot}%{_pkgdocdir}
a0bbcb
hardlink -cfv %{buildroot}%{_pkgdocdir}
a0bbcb
a0bbcb
a0bbcb
%check
a0bbcb
export USE_VALGRIND=0
a0bbcb
%ctest
a0bbcb
%ifarch %{valgrind_arches}
a0bbcb
export USE_VALGRIND=1
a0bbcb
%ctest
a0bbcb
%endif
a0bbcb
unset USE_VALGRIND
a0bbcb
a0bbcb
a0bbcb
%ldconfig_scriptlets
a0bbcb
a0bbcb
a0bbcb
%files
a0bbcb
%license AUTHORS
a0bbcb
%license COPYING
a0bbcb
%{_libdir}/lib%{name}.so.%{so_ver}*
a0bbcb
a0bbcb
a0bbcb
%files devel
a0bbcb
%doc %dir %{_pkgdocdir}
a0bbcb
%doc %{_pkgdocdir}/ChangeLog
a0bbcb
%doc %{_pkgdocdir}/README*
a0bbcb
%{_includedir}/%{name}
a0bbcb
%{_libdir}/cmake/%{name}
a0bbcb
%{_libdir}/lib%{name}.so
a0bbcb
%{_libdir}/pkgconfig/%{name}.pc
a0bbcb
a0bbcb
a0bbcb
%files doc
a0bbcb
%if 0%{?fedora} || 0%{?rhel} >= 7
a0bbcb
%license %{_datadir}/licenses/%{name}*
a0bbcb
%endif
a0bbcb
%doc %{_pkgdocdir}
a0bbcb
a0bbcb
a0bbcb
%changelog
a0bbcb
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.14-10
a0bbcb
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
a0bbcb
  Related: rhbz#1991688
a0bbcb
a0bbcb
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.14-9
a0bbcb
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
a0bbcb
a0bbcb
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-8
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
a0bbcb
a0bbcb
* Mon Jul 27 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-7
a0bbcb
- Use new cmake macros
a0bbcb
a0bbcb
* Tue May 26 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-6
a0bbcb
- Build using Ninja instead of Make
a0bbcb
- Add a patch to move Doxyfile into doc subdir
a0bbcb
- Remove pre-built html documentation
a0bbcb
- Update Doxyfile during %%prep
a0bbcb
- Add a patch to apply some optimizations to arraylist
a0bbcb
- Hardlink the files in %%_pkgdocdir
a0bbcb
a0bbcb
* Mon May 25 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-5
a0bbcb
- Run the testssuite with valgrind on %%valgrind_arches
a0bbcb
a0bbcb
* Mon May 18 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-4
a0bbcb
- Add a patch to fix a test
a0bbcb
- Add a patch to fix generation of user-documentation
a0bbcb
a0bbcb
* Mon May 11 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-3
a0bbcb
- Add upstream patch fixing usage of errno in json_parse_uint64()
a0bbcb
a0bbcb
* Sun May 10 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-2
a0bbcb
- Add a patch to backport fixes applied on upstream master branch
a0bbcb
- Re-enable RDRAND as json-c can detect broken implementations in CPUs now
a0bbcb
- Disable -Werror during build
a0bbcb
a0bbcb
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-1
a0bbcb
- Update to 0.14
a0bbcb
a0bbcb
* Mon Apr 20 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.4.20200416gita911439
a0bbcb
- Remove config.h file from installation
a0bbcb
- Drop hardlinking of the documentation files
a0bbcb
a0bbcb
* Thu Apr 16 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.3.20200416gita911439
a0bbcb
- Update to recent git snapshot
a0bbcb
a0bbcb
* Tue Apr 14 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.2.20200414git7fb8d56
a0bbcb
- Update to recent git snapshot
a0bbcb
a0bbcb
* Tue Apr 14 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.1.20200414gitab5425a
a0bbcb
- Update to recent git snapshot using forge macros
a0bbcb
a0bbcb
* Sun Apr 12 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-11
a0bbcb
- Drop bootstrap logic, as the package is no dependency of @build anymore
a0bbcb
- Add some explicit BuildRequires, which were implicit
a0bbcb
- Small spec file cleanups
a0bbcb
a0bbcb
* Sat Apr 11 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-10
a0bbcb
- Add explicit configure switch to disable rdrand
a0bbcb
- Add explicit configure switch to enable linking with Bsymbolic
a0bbcb
- Do not use macros to invoke executables
a0bbcb
- Drop obsolete %%pretrans scriptlet
a0bbcb
a0bbcb
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-9
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
a0bbcb
a0bbcb
* Thu Nov 28 2019 Petr Menšík <pemensik@redhat.com> - 0.13.1-8
a0bbcb
- Remove empty doc dir from library package
a0bbcb
a0bbcb
* Wed Nov 06 2019 Miroslav Lichvar <mlichvar@redhat.com> 0.13.1-7
a0bbcb
- Disable rdrand support (#1745333)
a0bbcb
a0bbcb
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-6
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
a0bbcb
a0bbcb
* Wed Jun 26 2019 Björn Esser <besser82@fedoraproject.org> - 0.13.1-5
a0bbcb
- Use hardlink without full path to the binary (#1721964)
a0bbcb
- Use new style bootstrap logic
a0bbcb
a0bbcb
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-4
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a0bbcb
a0bbcb
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-3
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
a0bbcb
a0bbcb
* Tue May 08 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-2
a0bbcb
- Add some cherry-picked fixes from upstream master
a0bbcb
a0bbcb
* Tue Mar 06 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-1
a0bbcb
- New upstream release (rhbz#1552053)
a0bbcb
a0bbcb
* Tue Mar 06 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-0.1
a0bbcb
- Bootstrapping for so-name bump
a0bbcb
a0bbcb
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-7
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a0bbcb
a0bbcb
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.13-6
a0bbcb
- Switch to %%ldconfig_scriptlets
a0bbcb
a0bbcb
* Thu Dec 14 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-5
a0bbcb
- Update patch fixing a segfault caused by possible invalid frees
a0bbcb
a0bbcb
* Wed Dec 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-4
a0bbcb
- Add upstream patch fixing invalid free in some cases
a0bbcb
a0bbcb
* Wed Dec 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-3
a0bbcb
- Add upstream patch for adding size_t json_c_object_sizeof()
a0bbcb
- Enable partial multi-threaded support
a0bbcb
a0bbcb
* Mon Dec 11 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-2
a0bbcb
- Drop json_object_private.h
a0bbcb
a0bbcb
* Mon Dec 11 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-1
a0bbcb
- New upstream release (rhbz#1524155)
a0bbcb
a0bbcb
* Sun Dec 10 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-0.1
a0bbcb
- Bootstrapping for so-name bump
a0bbcb
- Keep json_object_private.h
a0bbcb
a0bbcb
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-4
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a0bbcb
a0bbcb
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-3
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a0bbcb
a0bbcb
* Mon Jul 03 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-2
a0bbcb
- Add patch to replace obsolete autotools macro
a0bbcb
a0bbcb
* Thu Apr 27 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-1
a0bbcb
- Update to new upstream release
a0bbcb
- Introduces SONAME bump, that should have been in 0.12 already
a0bbcb
- Unify %%doc
a0bbcb
- General spec-file cleanup
a0bbcb
a0bbcb
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-8
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a0bbcb
a0bbcb
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-7
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a0bbcb
a0bbcb
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-6
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a0bbcb
a0bbcb
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-5
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a0bbcb
a0bbcb
* Tue Jul 29 2014 Christopher Meng <rpm@cicku.me> - 0.12-4
a0bbcb
- SONAME bump postponed.
a0bbcb
a0bbcb
* Mon Jul 28 2014 Christopher Meng <rpm@cicku.me> - 0.12-3
a0bbcb
- SONAME bump, see bug 1123785
a0bbcb
a0bbcb
* Fri Jul 25 2014 Christopher Meng <rpm@cicku.me> - 0.12-2
a0bbcb
- NVR bump
a0bbcb
a0bbcb
* Thu Jul 24 2014 Christopher Meng <rpm@cicku.me> - 0.12-1
a0bbcb
- Update to 0.12
a0bbcb
a0bbcb
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 0.11-8
a0bbcb
- fix license handling
a0bbcb
a0bbcb
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-7
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a0bbcb
a0bbcb
* Wed Apr 09 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-7
a0bbcb
- Address CVE-2013-6371 and CVE-2013-6370 (BZ #1085676 and #1085677).
a0bbcb
- Enabled rdrand support.
a0bbcb
a0bbcb
* Mon Feb 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-6
a0bbcb
- Bump spec.
a0bbcb
a0bbcb
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.11-5
a0bbcb
- Run test suite during build.
a0bbcb
- Drop empty NEWS from docs.
a0bbcb
a0bbcb
* Tue Sep 10 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-4
a0bbcb
- Remove default warning flags so that package builds on EPEL as well.
a0bbcb
a0bbcb
* Sat Aug 24 2013 Remi Collet <remi@fedoraproject.org> - 0.11-3
a0bbcb
- increase parser strictness for php
a0bbcb
a0bbcb
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
a0bbcb
a0bbcb
* Mon Apr 29 2013 Remi Collet <remi@fedoraproject.org> - 0.11-1
a0bbcb
- update to 0.11
a0bbcb
- fix source0
a0bbcb
- enable both json and json-c libraries
a0bbcb
a0bbcb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
a0bbcb
a0bbcb
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-2
a0bbcb
- Compile and install json_object_iterator using Remi Collet's fix (BZ #879771).
a0bbcb
a0bbcb
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-1
a0bbcb
- Update to 0.10 (BZ #879771).
a0bbcb
a0bbcb
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-5
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
a0bbcb
a0bbcb
* Mon Jan 23 2012 Jiri Pirko <jpirko@redhat.com> - 0.9-4
a0bbcb
- add json_tokener_parse_verbose, and return NULL on parser errors
a0bbcb
a0bbcb
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
a0bbcb
a0bbcb
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
a0bbcb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a0bbcb
a0bbcb
* Tue Apr 06 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.9-1
a0bbcb
- First release.