Implement bootstrap logic for so-name bumps

epel9
Björn Esser 6 years ago
parent f48205000a
commit 09e734ba1e
No known key found for this signature in database
GPG Key ID: F52E98007594C21D

@ -1,11 +1,26 @@
# Recent so-version, so we do not bump accidentally.
%global so_ver 4
# Set to 1 when building a bootstrap for a bumped so-name.
%global bootstrap 1
%if 0%{?bootstrap}
%global version_old 3.4.4
%global so_ver_old 3
%endif
Name: qrencode
Version: 4.0.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Generate QR 2D barcodes
License: LGPLv2+
URL: http://fukuchi.org/works/qrencode/
Source0: http://fukuchi.org/works/qrencode/qrencode-%{version}.tar.bz2
%if 0%{?bootstrap}
Source1: http://fukuchi.org/works/qrencode/qrencode-%{version_old}.tar.bz2
%endif
BuildRequires: gcc
BuildRequires: chrpath
@ -18,6 +33,7 @@ BuildRequires: autoconf >= 2.69
Qrencode is a utility software using libqrencode to encode string data in
a QR Code and save as a PNG image.
%package devel
Summary: QR Code encoding library - Development files
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
@ -34,8 +50,17 @@ Summary: QR Code encoding library - Shared libraries
The qrencode-libs package contains the shared libraries and header files for
applications that use qrencode.
%prep
%autosetup
%autosetup -Tb 0 -p 1
%if 0%{?bootstrap}
mkdir -p bootstrap_ver
pushd bootstrap_ver
tar --strip-components=1 -xf %{SOURCE1}
popd
%endif
%build
## Rebuild configure scripts for ARM 64 support. (RHBZ 926414)
@ -43,31 +68,60 @@ autoconf
%configure --with-tests
%make_build
%if 0%{?bootstrap}
pushd bootstrap_ver
autoconf
%configure --with-tests
%make_build
popd
%endif
%install
%make_install INSTALL="install -p"
%if 0%{?bootstrap}
%make_install -C bootstrap_ver
%{_bindir}/find %{buildroot} -xtype f -not \
-name 'lib%{name}.so.%{so_ver_old}*' -delete -print
%{_bindir}/find %{buildroot} -type l -not \
-name 'lib%{name}.so.%{so_ver_old}*' -delete -print
%endif
%make_install
rm -f %{buildroot}%{_libdir}/libqrencode.la
chrpath --delete %{buildroot}%{_bindir}/qrencode
%check
cd ./tests
pushd ./tests
sh test_all.sh
popd
%files
%{_bindir}/qrencode
%{_mandir}/man1/qrencode.1*
%files libs
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc ChangeLog NEWS README TODO
%{_libdir}/libqrencode.so.*
%{_libdir}/libqrencode.so.%{so_ver}*
%if 0%{?bootstrap}
%{_libdir}/libqrencode.so.%{so_ver_old}*
%endif
%files devel
%{_includedir}/qrencode.h
%{_libdir}/libqrencode.so
%{_libdir}/pkgconfig/libqrencode.pc
%changelog
* Tue Jun 25 2019 Björn Esser <besser82@fedoraproject.org> - 4.0.2-2
- Implement bootstrap logic for so-name bumps
* Tue Jun 25 2019 Paul Wouters <pwouters@redhat.com> - 4.0.2-1
- Update to 4.0.2 and cleanup by Vasiliy N. Glazov <vascom2@gmail.com>

Loading…
Cancel
Save