63b27b
%undefine __cmake_in_source_build
63b27b
%global _vpath_builddir build
63b27b
63b27b
Name: yajl
63b27b
Version: 2.1.0
a4429c
Release: 21%{?dist}
63b27b
Summary: Yet Another JSON Library (YAJL)
63b27b
63b27b
License: ISC
63b27b
URL: http://lloyd.github.com/yajl/
63b27b
63b27b
#
63b27b
# NB, upstream does not provide pre-built tar.gz downloads. Instead
63b27b
# they make you use the 'on the fly' generated tar.gz from GITHub's
63b27b
# web interface
63b27b
#
63b27b
# The Source0 for any version is obtained by a URL
63b27b
#
63b27b
#   https://github.com/lloyd/yajl/releases/tag/2.1.0
63b27b
#
63b27b
Source0: %{name}-%{version}.tar.gz
63b27b
Patch1: %{name}-%{version}-pkgconfig-location.patch
63b27b
Patch2: %{name}-%{version}-pkgconfig-includedir.patch
63b27b
Patch3: %{name}-%{version}-test-location.patch
63b27b
Patch4: %{name}-%{version}-dynlink-binaries.patch
a4429c
Patch5: https://github.com/containers/yajl/commit/49923ccb2143e36850bcdeb781e2bcdf5ce22f15.patch
63b27b
63b27b
BuildRequires:  gcc
63b27b
BuildRequires: cmake
63b27b
63b27b
%package devel
63b27b
Summary: Libraries, includes, etc to develop with YAJL
63b27b
Requires: %{name} = %{version}-%{release}
63b27b
63b27b
%description
63b27b
Yet Another JSON Library. YAJL is a small event-driven
63b27b
(SAX-style) JSON parser written in ANSI C, and a small
63b27b
validating JSON generator.
63b27b
63b27b
%description devel
63b27b
Yet Another JSON Library. YAJL is a small event-driven
63b27b
(SAX-style) JSON parser written in ANSI C, and a small
63b27b
validating JSON generator.
63b27b
63b27b
This sub-package provides the libraries and includes
63b27b
necessary for developing against the YAJL library
63b27b
63b27b
%prep
63b27b
%setup -q
63b27b
%patch1 -p1
63b27b
%patch2 -p1
63b27b
%patch3 -p1
63b27b
%patch4 -p1
a4429c
%patch5 -p1
63b27b
63b27b
%build
63b27b
# NB, we are not using upstream's 'configure'/'make'
63b27b
# wrapper, instead we use cmake directly to better
63b27b
# align with Fedora standards
63b27b
%cmake
63b27b
%cmake_build
63b27b
63b27b
63b27b
%install
63b27b
%cmake_install
63b27b
63b27b
63b27b
# No static libraries
63b27b
rm -f $RPM_BUILD_ROOT%{_libdir}/libyajl_s.a
63b27b
63b27b
63b27b
%check
63b27b
cd test
63b27b
(cd parsing && ./run_tests.sh)
63b27b
(cd api && ./run_tests.sh)
63b27b
63b27b
%ldconfig_scriptlets
63b27b
63b27b
%files
63b27b
%license COPYING
63b27b
%doc ChangeLog README TODO
63b27b
%{_bindir}/json_reformat
63b27b
%{_bindir}/json_verify
63b27b
%{_libdir}/libyajl.so.2
63b27b
%{_libdir}/libyajl.so.2.*
63b27b
63b27b
%files devel
63b27b
%dir %{_includedir}/yajl
63b27b
%{_includedir}/yajl/yajl_common.h
63b27b
%{_includedir}/yajl/yajl_gen.h
63b27b
%{_includedir}/yajl/yajl_parse.h
63b27b
%{_includedir}/yajl/yajl_tree.h
63b27b
%{_includedir}/yajl/yajl_version.h
63b27b
%{_libdir}/libyajl.so
63b27b
%{_libdir}/pkgconfig/yajl.pc
63b27b
63b27b
63b27b
%changelog
a4429c
* Tue Apr 26 2022 Jindrich Novy <jnovy@redhat.com> - 2.1.0-21
a4429c
- fix CVE-2022-24795
a4429c
- Related: #2061316
a4429c
9dedf0
* Fri Oct 01 2021 Jindrich Novy <jnovy@redhat.com> - 2.1.0-20
9dedf0
- perform only sanity/installability tests for now
9dedf0
- Related: #2000051
9dedf0
9dedf0
* Wed Sep 29 2021 Jindrich Novy <jnovy@redhat.com> - 2.1.0-19
9dedf0
- add gating.yaml
9dedf0
- Related: #2000051
9dedf0
63b27b
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.1.0-18
63b27b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
63b27b
  Related: rhbz#1991688
63b27b
63b27b
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.1.0-17
63b27b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
63b27b
63b27b
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-16
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
63b27b
63b27b
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-15
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
63b27b
63b27b
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-14
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
63b27b
63b27b
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-13
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
63b27b
63b27b
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-12
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
63b27b
63b27b
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-11
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
63b27b
63b27b
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-10
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
63b27b
63b27b
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.1.0-9
63b27b
- Switch to %%ldconfig_scriptlets
63b27b
63b27b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-8
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
63b27b
63b27b
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-7
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
63b27b
63b27b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-6
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
63b27b
63b27b
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-5
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
63b27b
63b27b
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-4
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
63b27b
63b27b
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-3
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
63b27b
63b27b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
63b27b
63b27b
* Mon Apr 28 2014 Daniel P. Berrange <berrange@redhat.com> - 2.1.0-1
63b27b
- Update to 2.1.0 release (rhbz #1080935)
63b27b
63b27b
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-3
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
63b27b
63b27b
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
63b27b
63b27b
* Mon Aug  6 2012 Daniel P. Berrange <berrange@redhat.com> - 2.0.4-1
63b27b
- Update to 2.0.4 release (rhbz #845777)
63b27b
- Fix License tag to reflect change in 2.0.0 series from BSD to ISC
63b27b
63b27b
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-3
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
63b27b
63b27b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-2
63b27b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
63b27b
63b27b
* Thu Nov 10 2011 Daniel P. Berrange <berrange@redhat.com> - 2.0.1-1
63b27b
- Update to 2.0.1 release
63b27b
63b27b
* Tue May  3 2011 Daniel P. Berrange <berrange@redhat.com> - 1.0.12-1
63b27b
- Update to 1.0.12 release
63b27b
63b27b
* Fri Dec 17 2010 Daniel P. Berrange <berrange@redhat.com> - 1.0.11-1
63b27b
- Update to 1.0.11 release
63b27b
63b27b
* Mon Jan 11 2010 Daniel P. Berrange <berrange@redhat.com> - 1.0.7-3
63b27b
- Fix ignoring of cflags (rhbz #547500)
63b27b
63b27b
* Tue Dec  8 2009 Daniel P. Berrange <berrange@redhat.com> - 1.0.7-2
63b27b
- Change use of 'define' to 'global'
63b27b
63b27b
* Mon Dec  7 2009 Daniel P. Berrange <berrange@redhat.com> - 1.0.7-1
63b27b
- Initial Fedora package