Drop bootstrap logic, as the package is no dependency of @build anymore

This commit is contained in:
Björn Esser 2020-04-12 18:07:52 +02:00
parent 84171889bc
commit 544cce2235
No known key found for this signature in database
GPG Key ID: F52E98007594C21D

View File

@ -3,29 +3,15 @@
%global so_ver 4 %global so_ver 4
%global reldate 20180305 %global reldate 20180305
# Change to %%bcond_without bootstrap to build
# in bootstrap mode for a bumped so-name.
# You also need to adjust the parameters below.
%bcond_with bootstrap
%if %{with bootstrap}
%global reldate_old 20180305
%global version_old 0.13.1
%global so_ver_old 4
%endif
Name: json-c Name: json-c
Version: 0.13.1 Version: 0.13.1
Release: 10%{?dist} Release: 11%{?dist}
Summary: JSON implementation in C 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 %{with bootstrap}
Source1: %{url}/archive/%{name}-%{version_old}-%{reldate_old}.tar.gz
%endif
# Cherry-picked from upstream. # Cherry-picked from upstream.
Patch0: %{url}/commit/da4b34355da023c439e96bc6ca31886cd69d6bdb.patch#/%{name}-0.13.1-parse_test_UTF8_BOM.patch Patch0: %{url}/commit/da4b34355da023c439e96bc6ca31886cd69d6bdb.patch#/%{name}-0.13.1-parse_test_UTF8_BOM.patch
@ -64,7 +50,7 @@ This package contains the reference manual for %{name}.
%prep %prep
%autosetup -Tb 0 -n %{name}-%{name}-%{version}-%{reldate} -p 1 %autosetup -n %{name}-%{name}-%{version}-%{reldate} -p 1
for doc in ChangeLog; do for doc in ChangeLog; do
iconv -f iso-8859-1 -t utf8 ${doc} > ${doc}.new iconv -f iso-8859-1 -t utf8 ${doc} > ${doc}.new
@ -75,16 +61,6 @@ done
sed -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am sed -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am
autoreconf -fiv autoreconf -fiv
%if %{with bootstrap}
mkdir -p bootstrap_ver
pushd bootstrap_ver
tar --strip-components=1 -xf %{SOURCE1}
sed -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am
autoreconf -fiv
popd
%endif
%build %build
%configure \ %configure \
@ -95,32 +71,10 @@ popd
--enable-shared \ --enable-shared \
--enable-threading --enable-threading
%make_build %make_build
doxygen Doxyfile
%{_bindir}/doxygen Doxyfile
%if %{with bootstrap}
pushd bootstrap_ver
%configure \
--disable-silent-rules \
--disable-static \
--disable-rdrand \
--enable-Bsymbolic \
--enable-shared \
--enable-threading
%make_build
popd
%endif
%install %install
%if %{with bootstrap}
%make_install -C bootstrap_ver
find %{buildroot} -xtype f -not -name 'lib%{name}.so.%{so_ver_old}*' \
-delete -print
find %{buildroot} -type l -not -name 'lib%{name}.so.%{so_ver_old}*' \
-delete -print
%endif
%make_install %make_install
find %{buildroot} -name '*.a' -delete -print find %{buildroot} -name '*.a' -delete -print
@ -134,10 +88,6 @@ hardlink -cvf %{buildroot}%{_pkgdocdir}
%check %check
%make_build check %make_build check
%if %{with bootstrap}
%make_build -C bootstrap_ver check
%endif
%ldconfig_scriptlets %ldconfig_scriptlets
@ -146,9 +96,6 @@ hardlink -cvf %{buildroot}%{_pkgdocdir}
%license AUTHORS %license AUTHORS
%license COPYING %license COPYING
%{_libdir}/lib%{name}.so.%{so_ver}* %{_libdir}/lib%{name}.so.%{so_ver}*
%if %{with bootstrap}
%{_libdir}/lib%{name}.so.%{so_ver_old}*
%endif
%files devel %files devel
@ -168,6 +115,9 @@ hardlink -cvf %{buildroot}%{_pkgdocdir}
%changelog %changelog
* Sun Apr 12 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-11
- Drop bootstrap logic, as the package is no dependency of @build anymore
* Sat Apr 11 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-10 * Sat Apr 11 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-10
- Add explicit configure switch to disable rdrand - Add explicit configure switch to disable rdrand
- Add explicit configure switch to enable linking with Bsymbolic - Add explicit configure switch to enable linking with Bsymbolic