SHA256
3
0
forked from pool/cmake

Accepting request 949754 from home:seijikun:branches:devel:tools:building

Build cmake's qhelp into new package cmake-doc-qhelp

OBS-URL: https://build.opensuse.org/request/show/949754
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=481
This commit is contained in:
Dirk Mueller 2022-02-01 12:27:12 +00:00 committed by Git OBS Bridge
parent 36afd89f33
commit 984f7b7049
2 changed files with 37 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jan 28 18:46:59 UTC 2022 - Markus Ebner <info@ebner-markus.de>
- Build cmake's qhelp into new package cmake-doc-qhelp
-------------------------------------------------------------------
Wed Jan 26 21:13:02 UTC 2022 - Christoph G <foss@grueninger.de>

View File

@ -17,18 +17,27 @@
%global flavor @BUILD_FLAVOR@%{nil}
# Flavor gui
%if "%{flavor}" == "gui"
%define psuffix -ui
%bcond_without gui
%else
%bcond_with gui
%endif
# Where available, the gui-flavor also enables qhelp docs
%if "%{flavor}" == "gui" && 0%{?suse_version} > 1500
%bcond_without qhelp
%else
%bcond_with qhelp
%endif
# Flavor mini
%if "%{flavor}" == "mini"
%define psuffix -mini
%bcond_without mini
%else
%bcond_with mini
%endif
# Flavor full
%if "%{flavor}" == "full"
%define psuffix -full
%bcond_without full
@ -92,6 +101,9 @@ BuildRequires: python3-Sphinx
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(Qt5Widgets)
%endif
%if %{with qhelp}
BuildRequires: libqt5-qttools-qhelpgenerator
%endif
%description
CMake is a cross-platform build system.
@ -111,6 +123,12 @@ Requires: cmake
This is a Graphical User Interface for CMake, a cross-platform
build system.
%package -n cmake-doc-qhelp
Summary: CMake documentation for offline reading - qhelp version
%description -n cmake-doc-qhelp
CMake documentation for offline reading - qhelp version.
%prep
# The publisher doesn't sign the source tarball, but a signatures file containing multiple hashes.
# Verify hashes in that file against source tarball.
@ -138,6 +156,9 @@ export CXXFLAGS="%{optflags}"
%endif
--parallel=0%{jobs} \
--verbose \
%if %{with qhelp}
--sphinx-qthelp \
%endif
%if %{with gui}
--qt-gui \
--sphinx-man \
@ -152,6 +173,7 @@ export CXXFLAGS="%{optflags}"
%if "%{flavor}" != ""
%make_install
mkdir -p %{buildroot}%{_libdir}/cmake
%if %{with gui}
%suse_update_desktop_file -r cmake-gui CMake Development IDE Tools Qt
@ -159,10 +181,12 @@ mkdir -p %{buildroot}%{_libdir}/cmake
rm -rf %{buildroot}%{_bindir}/{cpack,cmake,ctest,ccmake}
rm -rf %{buildroot}%{_datadir}/cmake
rm -rf %{buildroot}%{_datadir}/aclocal/cmake.m4
rm -rf %{buildroot}%{_docdir}/cmake
rm -rf %{buildroot}%{_datadir}/bash-completion/completions/{cmake,cpack,ctest}
rm -rf %{buildroot}%{_datadir}/emacs/site-lisp/cmake-mode.el
rm -rf %{buildroot}%{_datadir}/vim/
# delete docdir but preserve qhelp if applicable
find %{buildroot}%{_docdir}/cmake -mindepth 1 -not -name "CMake.qch" -delete
rmdir %{buildroot}%{_docdir}/cmake || true
%else
find %{buildroot}%{_datadir}/cmake -type f -print0 | xargs -0 chmod 644
@ -191,6 +215,12 @@ rm %{buildroot}%{_docdir}/cmake/Copyright.txt
-E "(TestUpload|SimpleInstall|SimpleInstall-Stage2|CPackComponentsForAll-RPM-(default|OnePackPerGroup|IgnoreGroup|AllInOne)|CPack_RPM)"
%endif
%if %{with qhelp}
%files -n cmake-doc-qhelp
%license Copyright.txt
%{_docdir}/cmake/CMake.qch
%endif
%if %{with gui}
%files -n cmake-gui
%license Copyright.txt
@ -207,6 +237,7 @@ rm %{buildroot}%{_docdir}/cmake/Copyright.txt
%license Copyright.txt
%{_mandir}/man7/*
%{_mandir}/man1/*
%else
%files