diff --git a/json-c.spec b/json-c.spec index cba7b75..21e37af 100644 --- a/json-c.spec +++ b/json-c.spec @@ -3,11 +3,12 @@ %global so_ver 4 %global reldate 20180305 -# Uncomment when building a bootstrap for a bumped so-name. +# Change to %bcond_without to build in bootstrap +# mode for a bumped so-name. # You also need to adjust the parameters below. -%global bootstrap 0 +%bcond_with bootstrap -%if 0%{?bootstrap} +%if %{with bootstrap} %global reldate_old 20180305 %global version_old 0.13.1 %global so_ver_old 4 @@ -22,7 +23,7 @@ Summary: JSON implementation in C License: MIT URL: https://github.com/%{name}/%{name} Source0: %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz -%if 0%{?bootstrap} +%if %{with bootstrap} Source1: %{url}/archive/%{name}-%{version_old}-%{reldate_old}.tar.gz %endif @@ -74,7 +75,7 @@ done %{__sed} -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am %{_bindir}/autoreconf -fiv -%if 0%{?bootstrap} +%if %{with bootstrap} %{__mkdir} -p bootstrap_ver pushd bootstrap_ver %{__tar} --strip-components=1 -xf %{SOURCE1} @@ -97,7 +98,7 @@ popd %{_bindir}/doxygen Doxyfile -%if 0%{?bootstrap} +%if %{with bootstrap} pushd bootstrap_ver %configure \ --disable-silent-rules \ @@ -112,7 +113,7 @@ popd %install -%if 0%{?bootstrap} +%if %{with bootstrap} %make_install -C bootstrap_ver %{_bindir}/find %{buildroot} -xtype f -not \ -name 'lib%{name}.so.%{so_ver_old}*' -delete -print @@ -133,7 +134,7 @@ hardlink -cvf %{buildroot}%{_pkgdocdir} %check %make_build check -%if 0%{?bootstrap} +%if %{with bootstrap} %make_build -C bootstrap_ver check %endif @@ -154,7 +155,7 @@ end %license AUTHORS %license COPYING %{_libdir}/lib%{name}.so.%{so_ver}* -%if 0%{?bootstrap} +%if %{with bootstrap} %{_libdir}/lib%{name}.so.%{so_ver_old}* %endif @@ -171,13 +172,14 @@ end %files doc %if 0%{?fedora} || 0%{?rhel} >= 7 %license %{_datadir}/licenses/%{name}* -%endif # 0%%{?fedora} || 0%%{?rhel} >= 7 +%endif %doc %{_pkgdocdir} %changelog * Wed Jun 26 2019 Björn Esser - 0.13.1-5 - Use hardlink without full path to the binary (#1721964) +- Use new style bootstrap logic * Fri Feb 01 2019 Fedora Release Engineering - 0.13.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild