From 28d30d7d38d2bdc964bbaae14db0e1cd6ee39b3c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 28 Nov 2022 09:25:00 +0100 Subject: make test suite optional --- libhandlebars.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/libhandlebars.spec b/libhandlebars.spec index 1ccd3ce..726b83d 100644 --- a/libhandlebars.spec +++ b/libhandlebars.spec @@ -7,6 +7,13 @@ # Please, preserve the changelog entries # +%if 0%{?rhel} == 7 +# disabe test suite as check version is too old +%bcond_with tests +%else +%bcond_without tests +%endif + %global soname 9 %global libname libhandlebars @@ -48,7 +55,9 @@ BuildRequires: json-c-devel BuildRequires: libtalloc-devel BuildRequires: pcre-devel BuildRequires: lmdb-devel -BuildRequires: check-devel >= 0.9.9 +%if %{with tests} +BuildRequires: check-devel >= 0.12 +%endif %if 0%{?fedora} # Else, use upstream generated files BuildRequires: bison >= 3.0.2 @@ -95,7 +104,10 @@ mv %{mspec_project}-%{mspec_commit} spec/mustache %build -%configure +%configure \ +%if %{without tests} + --disable-check +%endif make %{?_smp_mflags} @@ -106,8 +118,10 @@ make install DESTDIR=%{buildroot} rm %{buildroot}%{_libdir}/*.{a,la} +%if %{with tests} %check make test +%endif %if 0%{?fedora} < 28 && 0%{?rhel} < 8 -- cgit