diff --git a/cmocka.spec b/cmocka.spec index a404656..012cd32 100644 --- a/cmocka.spec +++ b/cmocka.spec @@ -16,11 +16,11 @@ # -%global with_docs 1 +%bcond_without docs %if 0%{?suse_version} < 1500 || 0%{?sle_version} < 150000 # We need cmake >= 3.9 to build docs -%global with_docs 0 +%bcond_with docs %endif Name: cmocka @@ -115,9 +115,9 @@ Static cmocka unit testing library. -DUNIT_TESTING=ON make %{?_smp_mflags} -%if %{with_docs} +%if %{with docs} make docs -%endif # with_docs +%endif # with docs %install %cmake_install @@ -137,9 +137,9 @@ popd %{_libdir}/libcmocka.so.* %files -n libcmocka-devel -%if %{with_docs} +%if %{with docs} %doc build/doc/html -%endif # with_docs +%endif # with docs %{_includedir}/cmocka.h %{_includedir}/cmocka_pbc.h %dir %{_includedir}/cmockery