Blame SPECS/json-c.spec

Packit 2b6788
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
Packit 2b6788
Packit 2b6788
%global so_ver      4
Packit 2b6788
%global reldate     20180305
Packit 2b6788
Packit 2b6788
# Uncomment when building a bootstrap for a bumped so-name.
Packit 2b6788
# You also need to adjust the parameters below.
Packit 2b6788
%global bootstrap   0
Packit 2b6788
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
%global reldate_old 20171207
Packit 2b6788
%global version_old 0.13
Packit 2b6788
%global so_ver_old  3
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
Packit 2b6788
Name:           json-c
Packit 2b6788
Version:        0.13.1
Packit 2b6788
Release:        0.2%{?dist}
Packit 2b6788
Summary:        JSON implementation in C
Packit 2b6788
Packit 2b6788
License:        MIT
Packit 2b6788
URL:            https://github.com/%{name}/%{name}
Packit 2b6788
Source0:        %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
Source1:        %{url}/archive/%{name}-%{version_old}-%{reldate_old}.tar.gz
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
BuildRequires:  libtool
Packit 2b6788
Packit 2b6788
%description
Packit 2b6788
JSON-C implements a reference counting object model that allows you
Packit 2b6788
to easily construct JSON objects in C, output them as JSON formatted
Packit 2b6788
strings and parse JSON formatted strings back into the C representation
Packit 2b6788
of JSON objects.  It aims to conform to RFC 7159.
Packit 2b6788
Packit 2b6788
Packit 2b6788
%package        devel
Packit 2b6788
Summary:        Development files for %{name}
Packit 2b6788
Packit 2b6788
Requires:       %{name}%{?_isa} == %{version}-%{release}
Packit 2b6788
Packit 2b6788
%description    devel
Packit 2b6788
This package contains libraries and header files for
Packit 2b6788
developing applications that use %{name}.
Packit 2b6788
Packit 2b6788
Packit 2b6788
%package        doc
Packit 2b6788
Summary:        Reference manual for json-c
Packit 2b6788
Packit 2b6788
BuildArch:      noarch
Packit 2b6788
Packit 2b6788
BuildRequires:  doxygen
Packit 2b6788
BuildRequires:  hardlink
Packit 2b6788
Packit 2b6788
%description    doc
Packit 2b6788
This package contains the reference manual for %{name}.
Packit 2b6788
Packit 2b6788
Packit 2b6788
%prep
Packit 2b6788
%autosetup -Tb 0 -n %{name}-%{name}-%{version}-%{reldate} -p 1
Packit 2b6788
Packit 2b6788
for doc in ChangeLog; do
Packit 2b6788
  %{_bindir}/iconv -f iso-8859-1 -t utf8 ${doc} > ${doc}.new
Packit 2b6788
  /bin/touch -r ${doc} ${doc}.new
Packit 2b6788
  %{__mv} -f ${doc}.new ${doc}
Packit 2b6788
done
Packit 2b6788
Packit 2b6788
%{__sed} -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am
Packit 2b6788
%{_bindir}/autoreconf -fiv
Packit 2b6788
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
%{__mkdir} -p bootstrap_ver
Packit 2b6788
pushd bootstrap_ver
Packit 2b6788
%{__tar} --strip-components=1 -xf %{SOURCE1}
Packit 2b6788
Packit 2b6788
%{__sed} -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am
Packit 2b6788
%{_bindir}/autoreconf -fiv
Packit 2b6788
popd
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
Packit 2b6788
%build
Packit 2b6788
%configure               \
Packit 2b6788
  --disable-silent-rules \
Packit 2b6788
  --disable-static       \
Packit 2b6788
  --enable-rdrand        \
Packit 2b6788
  --enable-shared        \
Packit 2b6788
  --enable-threading
Packit 2b6788
Packit 2b6788
%make_build
Packit 2b6788
Packit 2b6788
%{_bindir}/doxygen Doxyfile
Packit 2b6788
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
pushd bootstrap_ver
Packit 2b6788
%configure               \
Packit 2b6788
  --disable-silent-rules \
Packit 2b6788
  --disable-static       \
Packit 2b6788
  --enable-rdrand        \
Packit 2b6788
  --enable-shared        \
Packit 2b6788
  --enable-threading
Packit 2b6788
Packit 2b6788
%make_build
Packit 2b6788
popd
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
Packit 2b6788
%install
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
%make_install -C bootstrap_ver
Packit 2b6788
%{__rm} -fr %{buildroot}%{_includedir}/%{name}   \
Packit 2b6788
            %{buildroot}%{_libdir}/lib%{name}.so \
Packit 2b6788
            %{buildroot}%{_libdir}/pkgconfig
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
%make_install
Packit 2b6788
Packit 2b6788
%{_bindir}/find %{buildroot} -name '*.a' -delete -print
Packit 2b6788
%{_bindir}/find %{buildroot} -name '*.la' -delete -print
Packit 2b6788
Packit 2b6788
%{__mkdir} -p %{buildroot}%{_pkgdocdir}
Packit 2b6788
%{__cp} -pr doc/html ChangeLog README README.* %{buildroot}%{_pkgdocdir}
Packit 2b6788
%{_sbindir}/hardlink -cvf %{buildroot}%{_pkgdocdir}
Packit 2b6788
Packit 2b6788
Packit 2b6788
%check
Packit 2b6788
%make_build check
Packit 2b6788
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
%make_build -C bootstrap_ver check
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
Packit 2b6788
%pretrans devel -p <lua>
Packit 2b6788
path = "%{_includedir}/%{name}"
Packit 2b6788
st = posix.stat(path)
Packit 2b6788
if st and st.type == "link" then
Packit 2b6788
  os.remove(path)
Packit 2b6788
end
Packit 2b6788
Packit 2b6788
Packit 2b6788
%ldconfig_scriptlets
Packit 2b6788
Packit 2b6788
Packit 2b6788
%files
Packit 2b6788
%doc %dir %{_pkgdocdir}
Packit 2b6788
%license AUTHORS
Packit 2b6788
%license COPYING
Packit 2b6788
%{_libdir}/lib%{name}.so.%{so_ver}*
Packit 2b6788
%if 0%{?bootstrap}
Packit 2b6788
%{_libdir}/lib%{name}.so.%{so_ver_old}*
Packit 2b6788
%endif
Packit 2b6788
Packit 2b6788
Packit 2b6788
%files devel
Packit 2b6788
%doc %dir %{_pkgdocdir}
Packit 2b6788
%doc %{_pkgdocdir}/ChangeLog
Packit 2b6788
%doc %{_pkgdocdir}/README*
Packit 2b6788
%{_includedir}/%{name}/
Packit 2b6788
%{_libdir}/lib%{name}.so
Packit 2b6788
%{_libdir}/pkgconfig/%{name}.pc
Packit 2b6788
Packit 2b6788
Packit 2b6788
%files doc
Packit 2b6788
%if 0%{?fedora} || 0%{?rhel} >= 7
Packit 2b6788
%license %{_datadir}/licenses/%{name}*
Packit 2b6788
%endif # 0%%{?fedora} || 0%%{?rhel} >= 7
Packit 2b6788
%doc %{_pkgdocdir}
Packit 2b6788
Packit 2b6788
Packit 2b6788
%changelog
Packit 2b6788
* Fri Aug 03 2018 Radovan Sroka <rsroka@redhat.com> - 0.13.1-0.2
Packit 2b6788
- disable bootstrap for RHEL8
Packit 2b6788
Packit 2b6788
* Tue Mar 06 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-0.1
Packit 2b6788
- Bootstrapping for so-name bump
Packit 2b6788
Packit 2b6788
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-7
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.13-6
Packit 2b6788
- Switch to %%ldconfig_scriptlets
Packit 2b6788
Packit 2b6788
* Thu Dec 14 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-5
Packit 2b6788
- Update patch fixing a segfault caused by possible invalid frees
Packit 2b6788
Packit 2b6788
* Wed Dec 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-4
Packit 2b6788
- Add upstream patch fixing invalid free in some cases
Packit 2b6788
Packit 2b6788
* Wed Dec 13 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-3
Packit 2b6788
- Add upstream patch for adding size_t json_c_object_sizeof()
Packit 2b6788
- Enable partial multi-threaded support
Packit 2b6788
Packit 2b6788
* Mon Dec 11 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-2
Packit 2b6788
- Drop json_object_private.h
Packit 2b6788
Packit 2b6788
* Mon Dec 11 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-1
Packit 2b6788
- New upstream release (rhbz#1524155)
Packit 2b6788
Packit 2b6788
* Sun Dec 10 2017 Björn Esser <besser82@fedoraproject.org> - 0.13-0.1
Packit 2b6788
- Bootstrapping for so-name bump
Packit 2b6788
- Keep json_object_private.h
Packit 2b6788
Packit 2b6788
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-4
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12.1-3
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Mon Jul 03 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-2
Packit 2b6788
- Add patch to replace obsolete autotools macro
Packit 2b6788
Packit 2b6788
* Thu Apr 27 2017 Björn Esser <besser82@fedoraproject.org> - 0.12.1-1
Packit 2b6788
- Update to new upstream release
Packit 2b6788
- Introduces SONAME bump, that should have been in 0.12 already
Packit 2b6788
- Unify %%doc
Packit 2b6788
- General spec-file cleanup
Packit 2b6788
Packit 2b6788
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-8
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-7
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-6
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12-5
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Tue Jul 29 2014 Christopher Meng <rpm@cicku.me> - 0.12-4
Packit 2b6788
- SONAME bump postponed.
Packit 2b6788
Packit 2b6788
* Mon Jul 28 2014 Christopher Meng <rpm@cicku.me> - 0.12-3
Packit 2b6788
- SONAME bump, see bug 1123785
Packit 2b6788
Packit 2b6788
* Fri Jul 25 2014 Christopher Meng <rpm@cicku.me> - 0.12-2
Packit 2b6788
- NVR bump
Packit 2b6788
Packit 2b6788
* Thu Jul 24 2014 Christopher Meng <rpm@cicku.me> - 0.12-1
Packit 2b6788
- Update to 0.12
Packit 2b6788
Packit 2b6788
* Sat Jul 12 2014 Tom Callaway <spot@fedoraproject.org> - 0.11-8
Packit 2b6788
- fix license handling
Packit 2b6788
Packit 2b6788
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-7
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Wed Apr 09 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-7
Packit 2b6788
- Address CVE-2013-6371 and CVE-2013-6370 (BZ #1085676 and #1085677).
Packit 2b6788
- Enabled rdrand support.
Packit 2b6788
Packit 2b6788
* Mon Feb 10 2014 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-6
Packit 2b6788
- Bump spec.
Packit 2b6788
Packit 2b6788
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 0.11-5
Packit 2b6788
- Run test suite during build.
Packit 2b6788
- Drop empty NEWS from docs.
Packit 2b6788
Packit 2b6788
* Tue Sep 10 2013 Susi Lehtola <jussilehtola@fedoraproject.org> - 0.11-4
Packit 2b6788
- Remove default warning flags so that package builds on EPEL as well.
Packit 2b6788
Packit 2b6788
* Sat Aug 24 2013 Remi Collet <remi@fedoraproject.org> - 0.11-3
Packit 2b6788
- increase parser strictness for php
Packit 2b6788
Packit 2b6788
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.11-2
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Mon Apr 29 2013 Remi Collet <remi@fedoraproject.org> - 0.11-1
Packit 2b6788
- update to 0.11
Packit 2b6788
- fix source0
Packit 2b6788
- enable both json and json-c libraries
Packit 2b6788
Packit 2b6788
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-2
Packit 2b6788
- Compile and install json_object_iterator using Remi Collet's fix (BZ #879771).
Packit 2b6788
Packit 2b6788
* Sat Nov 24 2012 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.10-1
Packit 2b6788
- Update to 0.10 (BZ #879771).
Packit 2b6788
Packit 2b6788
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-5
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Mon Jan 23 2012 Jiri Pirko <jpirko@redhat.com> - 0.9-4
Packit 2b6788
- add json_tokener_parse_verbose, and return NULL on parser errors
Packit 2b6788
Packit 2b6788
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-3
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9-2
Packit 2b6788
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
Packit 2b6788
Packit 2b6788
* Tue Apr 06 2010 Jussi Lehtola <jussilehtola@fedoraproject.org> - 0.9-1
Packit 2b6788
- First release.