diff --git a/lensfun.spec b/lensfun.spec index 5f12dbf..c3b87f1 100644 --- a/lensfun.spec +++ b/lensfun.spec @@ -1,4 +1,8 @@ +%if !0%{?bootstrap} && 0%{?fedora} > 23 +%global tests 1 +%endif + Name: lensfun Version: 0.3.2 Summary: Library to rectify defects introduced by photographic lenses @@ -78,7 +82,7 @@ mkdir %{_target_platform} pushd %{_target_platform} %{cmake} .. \ -DBUILD_DOC:BOOL=ON \ - -DBUILD_TESTS:BOOL=ON \ + -DBUILD_TESTS:BOOL=%{?tests:ON}%{!?tests:OFF} \ -DCMAKE_BUILD_TYPE:STRING=Release popd @@ -97,11 +101,14 @@ mkdir -p %{buildroot}/var/lib/lensfun-updates rm -fv %{buildroot}%{_bindir}/g-lensfun-update-data \ %{buildroot}%{_mandir}/man1/g-lensfun-update-data.* + %check +%if 0%{?tests} pushd %{_target_platform} export CTEST_OUTPUT_ON_FAILURE=1 ctest -vv popd +%endif %post -p /sbin/ldconfig