# Conditional build:
%bcond_with bootstrap # disable features to able to build without installed qt5
# -- build targets
-%bcond_without qch # documentation in QCH format
+%bcond_without doc # Documentation
# -- features
%bcond_with qtmultimedia # QtMultimedia support
%if %{with bootstrap}
-%undefine with_qch
+%undefine with_doc
%endif
%define orgname qtwebkit
BuildRequires: libxslt-devel
BuildRequires: pkgconfig
BuildRequires: rpmbuild(macros) >= 1.654
-%if %{with qch}
+%if %{with doc}
BuildRequires: qt5-assistant >= %{qttools_ver}
%endif
BuildRequires: qt5-build >= %{qtbase_ver}
%{?with_qtmultimedia:WEBKIT_CONFIG+=use_qtmultimedia}
%{__make}
-%{__make} %{!?with_qch:html_}docs
+%{?with_doc:%{__make} docs}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
INSTALL_ROOT=$RPM_BUILD_ROOT
-%{__make} install_%{!?with_qch:html_}docs \
+%if %{with doc}
+%{__make} install_docs \
INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
# kill unnecessary -L%{_libdir} from *.la, *.prl, *.pc
%{__sed} -i -e "s,-L%{_libdir} \?,,g" \
%{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets.pri
%{qt5dir}/mkspecs/modules/qt_lib_webkitwidgets_private.pri
+%if %{with doc}
%files doc
%defattr(644,root,root,755)
%{_docdir}/qt5-doc/qtwebkit
-%if %{with qch}
%files doc-qch
%defattr(644,root,root,755)
%{_docdir}/qt5-doc/qtwebkit.qch