Add generic patches_touch_autotools mechanism for running autoreconf.

This commit is contained in:
Richard W.M. Jones 2018-07-01 16:35:07 +01:00
parent 3c237f554a
commit 64dbc29874
1 changed files with 8 additions and 0 deletions

View File

@ -34,6 +34,11 @@ Source1: http://libguestfs.org/download/nbdkit/%{name}-%{version}.tar.gz.
Source2: libguestfs.keyring
%endif
%global patches_touch_autotools 0
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool
%endif
%if 0%{?rhel} == 7
# On RHEL 7, nothing in the virt stack is shipped on aarch64 and
# libguestfs was not shipped on POWER (fixed in 7.5). We could in
@ -430,6 +435,9 @@ tmphome="$(mktemp -d)"
gpgv2 --homedir "$tmphome" --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%endif
%autosetup -p1
%if 0%{patches_touch_autotools}
autoreconf -i
%endif
%ifnarch %{complete_test_arches}
# Simplify the test suite so it doesn't require qemu.