diff --git a/eigen3.spec b/eigen3.spec index 4536d0d..d0adeba 100644 --- a/eigen3.spec +++ b/eigen3.spec @@ -15,15 +15,14 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%global flavor @BUILD_FLAVOR@%{nil} - %bcond_with tests +%bcond_without docs %if %{flavor} == "docs" %define pkgsuffix -doc %endif -Name: eigen3%{?pkgsuffix} +Name: eigen3 Version: 3.3.7 Release: 0 Summary: C++ Template Library for Linear Algebra @@ -53,7 +52,7 @@ BuildRequires: pkg-config BuildRequires: sparsehash-devel BuildRequires: suitesparse-devel BuildRequires: superlu-devel -%if %{flavor} == "docs" +%if %{with docs} BuildRequires: doxygen BuildRequires: fdupes BuildRequires: graphviz @@ -84,14 +83,13 @@ Obsoletes: libeigen3-devel < %{version} Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms. -%if %{flavor} == "docs" +%package docs Summary: Documentation for the Eigen3 C++ Template Library for Linear Algebra Group: Documentation/HTML -%description +%description doc Documentation in HTML format for the Eigen3 C++ Template Library for Linear Algebra -%endif %prep %setup -q -n eigen-eigen-323c052e1731 @@ -113,9 +111,8 @@ echo "HTML_TIMESTAMP = NO" >> doc/Doxyfile.in -DINCLUDE_INSTALL_DIR=%{_includedir}/eigen3 \ -DGOOGLEHASH_INCLUDES=%{_includedir} -%if %{flavor} == "" make %{?_smp_mflags} all -%else +%if %{with docs} make %{?_smp_mflags} doc %endif @@ -126,11 +123,6 @@ find doc -name _formulas.log -print -delete %cmake_install %fdupes -s build/doc/html/ -%if %{flavor} == "docs" -%files -%doc build/doc/html/ - -%else %files devel %license COPYING.* %{_includedir}/eigen3/ @@ -138,6 +130,7 @@ find doc -name _formulas.log -print -delete %{_datadir}/pkgconfig/eigen3.pc %{_datadir}/cmake/Modules/FindEigen3.cmake -%endif +%files doc +%doc build/doc/html/ %changelog