From 0a66321e6c718d60384e559e14fffa09cbd4a0e9 Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Wed, 26 Mar 2025 12:01:12 +0800 Subject: [PATCH] build documentation --- qt6-qtconnectivity.spec | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/qt6-qtconnectivity.spec b/qt6-qtconnectivity.spec index 49e61ba..6a0bba3 100644 --- a/qt6-qtconnectivity.spec +++ b/qt6-qtconnectivity.spec @@ -1,12 +1,13 @@ - %global qt_module qtconnectivity %global examples 1 +%bcond_without doc + Summary: Qt6 - Connectivity components Name: qt6-%{qt_module} Version: 6.8.2 -Release: 1 +Release: 2 # See LICENSE.GPL3, respectively, for exception details License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 @@ -29,6 +30,9 @@ BuildRequires: qt6-qtdeclarative-devel >= %{version} BuildRequires: pkgconfig(bluez) BuildRequires: pkgconfig(xkbcommon) >= 0.4.1 BuildRequires: openssl-devel +%if %{with doc} +BuildRequires: /usr/bin/qdoc-qt6 +%endif %description %{summary}. @@ -48,6 +52,13 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %{summary}. %endif +%package doc +Summary: Documentation for %{qt_module} +Buildarch: noarch + +%description doc +Documentation for %{qt_module}. + %prep %autosetup -n %{qt_module}-everywhere-src-%{version} -p1 @@ -57,9 +68,17 @@ Requires: %{name}%{?_isa} = %{version}-%{release} -DQT_INSTALL_EXAMPLES_SOURCES=%{?examples:ON}%{!?examples:OFF} %cmake_build +%if %{with doc} +%cmake_build --target docs +%endif + %install %cmake_install +%if %{with doc} +DESTDIR="%{buildroot}" %{__cmake} --build %{__cmake_builddir} --target install_docs +%endif + ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt6_libdir} @@ -104,7 +123,15 @@ popd %{_qt6_examplesdir}/ %endif +%if %{with doc} +%files doc +%{_docdir}/qt6/* +%endif + %changelog +* Wed Mar 26 2025 Funda Wang - 6.8.2-2 +- build documentation + * Sun Feb 02 2025 Funda Wang - 6.8.2-1 - update to 6.8.2 -- Gitee