From 05cb961e31a2bb0a029b7b159fe95b97c9b1c69d Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Mon, 24 Mar 2025 16:06:06 +0800 Subject: [PATCH] build documentation --- qt6-qtimageformats.spec | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/qt6-qtimageformats.spec b/qt6-qtimageformats.spec index 225b169..4ba0f5a 100644 --- a/qt6-qtimageformats.spec +++ b/qt6-qtimageformats.spec @@ -1,11 +1,13 @@ %global qt_module qtimageformats +%bcond_without doc + %define short_version 6.5 Summary: Qt6 - QtImageFormats component Name: qt6-%{qt_module} Version: 6.8.2 -Release: 1 +Release: 2 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 Url: https://www.qt.io @@ -24,6 +26,9 @@ BuildRequires: libtiff-devel BuildRequires: jasper-devel BuildRequires: pkgconfig(libmng) BuildRequires: pkgconfig(libwebp) +%if %{with doc} +BuildRequires: /usr/bin/qdoc-qt6 +%endif # filter plugin provides %global __provides_exclude_from ^%{_qt6_plugindir}/.*\\.so$ @@ -41,6 +46,13 @@ Requires: %{name}%{?_isa} = %{version}-%{release} %description examples %{summary}. +%package doc +Summary: Documentation for %{qt_module} +Buildarch: noarch + +%description doc +Documentation for %{qt_module}. + %prep %autosetup -n %{qt_module}-everywhere-src-%{version} -p1 rm -rv src/3rdparty @@ -49,9 +61,17 @@ rm -rv src/3rdparty %cmake_qt6 -DQT_FEATURE_mng=ON %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 + %files %license LICENSES/GPL* %license LICENSES/LGPL* @@ -66,7 +86,15 @@ rm -rv src/3rdparty %{_qt6_libdir}/cmake/Qt6/*.cmake %{_qt6_libdir}/cmake/Qt6Gui/*.cmake +%if %{with doc} +%files doc +%{_docdir}/qt6/* +%endif + %changelog +* Mon Mar 24 2025 Funda Wang - 6.8.2-2 +- Build documentaation + * Sat Feb 01 2025 Funda Wang - 6.8.2-1 - update to 6.8.2 -- Gitee