Use new style bootstrap logic

This commit is contained in:
Björn Esser 2019-06-26 17:05:49 +02:00
parent 974f2b1de1
commit 057e4ad332
No known key found for this signature in database
GPG Key ID: F52E98007594C21D

View File

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