Use bcond
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=42
This commit is contained in:
parent
88417dd117
commit
bf527165a8
12
cmocka.spec
12
cmocka.spec
@ -16,11 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%global with_docs 1
|
%bcond_without docs
|
||||||
|
|
||||||
%if 0%{?suse_version} < 1500 || 0%{?sle_version} < 150000
|
%if 0%{?suse_version} < 1500 || 0%{?sle_version} < 150000
|
||||||
# We need cmake >= 3.9 to build docs
|
# We need cmake >= 3.9 to build docs
|
||||||
%global with_docs 0
|
%bcond_with docs
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: cmocka
|
Name: cmocka
|
||||||
@ -115,9 +115,9 @@ Static cmocka unit testing library.
|
|||||||
-DUNIT_TESTING=ON
|
-DUNIT_TESTING=ON
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
%if %{with_docs}
|
%if %{with docs}
|
||||||
make docs
|
make docs
|
||||||
%endif # with_docs
|
%endif # with docs
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
@ -137,9 +137,9 @@ popd
|
|||||||
%{_libdir}/libcmocka.so.*
|
%{_libdir}/libcmocka.so.*
|
||||||
|
|
||||||
%files -n libcmocka-devel
|
%files -n libcmocka-devel
|
||||||
%if %{with_docs}
|
%if %{with docs}
|
||||||
%doc build/doc/html
|
%doc build/doc/html
|
||||||
%endif # with_docs
|
%endif # with docs
|
||||||
%{_includedir}/cmocka.h
|
%{_includedir}/cmocka.h
|
||||||
%{_includedir}/cmocka_pbc.h
|
%{_includedir}/cmocka_pbc.h
|
||||||
%dir %{_includedir}/cmockery
|
%dir %{_includedir}/cmockery
|
||||||
|
Loading…
Reference in New Issue
Block a user