Drop the HTML reference manual altogether
Enable Doxygen-generated PDF help in lieu of HTML, and keep installing devhelp. See discussion at https://bugzilla.redhat.com/show_bug.cgi?id=2006555.
This commit is contained in:
parent
8a832aa915
commit
4c0b19e52f
@ -6,6 +6,13 @@
|
||||
# building an autotools-generated tarball with meson, or vice versa.
|
||||
%bcond_without maintainer_mode
|
||||
|
||||
# Doxygen HTML help is not suitable for packaging due to a minified JavaScript
|
||||
# bundle inserted by Doxygen itself. See discussion at
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2006555.
|
||||
#
|
||||
# We can enable the Doxygen PDF documentation as a lesser substitute.
|
||||
%bcond_without doc_pdf
|
||||
|
||||
Name: cairomm%{apiver}
|
||||
Summary: C++ API for the cairo graphics library
|
||||
Version: 1.16.1
|
||||
@ -50,12 +57,15 @@ BuildRequires: mm-common
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(Getopt::Long)
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: web-assets-devel
|
||||
# dot
|
||||
BuildRequires: graphviz
|
||||
# xsltproc
|
||||
BuildRequires: libxslt
|
||||
BuildRequires: pkgconfig(mm-common-libstdc++)
|
||||
%if %{with doc_pdf}
|
||||
BuildRequires: doxygen-latex
|
||||
BuildRequires: make
|
||||
%endif
|
||||
|
||||
# For tests:
|
||||
BuildRequires: boost-devel
|
||||
@ -79,28 +89,12 @@ The API/ABI version series is %{apiver}.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for cairomm%{apiver}
|
||||
# The documentation is licensed LGPLv2, same as the base package, except that
|
||||
# several files inserted by Doxygen are MIT-licensed:
|
||||
# - %%{_docdir}/cairomm-%%{apiver}/reference/html/dynsections.js
|
||||
# - %%{_docdir}/cairomm-%%{apiver}/reference/html/menu.js
|
||||
# - %%{_docdir}/cairomm-%%{apiver}/reference/html/menudata.js
|
||||
# - %%{_docdir}/cairomm-%%{apiver}/reference/html/search/search.js
|
||||
License: LGPLv2 and MIT
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: libstdc++-docs
|
||||
Requires: libsigc++20-doc
|
||||
|
||||
Requires: js-jquery
|
||||
# We do not treat the Doxygen-generated JavaScript files as bundled libraries,
|
||||
# but as generated helper code that may potentially vary from project to
|
||||
# project based on the settings in the Doxyfile.
|
||||
|
||||
%description doc
|
||||
Documentation for cairomm%{apiver} can be viewed either through the devhelp
|
||||
documentation browser or through a web browser at
|
||||
%{_docdir}/cairomm%{apiver}-%{apiver}/.
|
||||
Documentation for cairomm%{apiver} can be viewed through the devhelp
|
||||
documentation browser.
|
||||
|
||||
The API/ABI version series is %{apiver}.
|
||||
|
||||
@ -123,10 +117,21 @@ rm -rf "${workdir}"
|
||||
# sources are banned in Fedora. (Note also that the bundled JavaScript had a
|
||||
# different license.) We also remove the tag file, which triggers a rebuild of
|
||||
# the documentation. While we are at it, we might as well rebuild the devhelp
|
||||
# XML too.
|
||||
# XML too. Note that we will not install the HTML documentation.
|
||||
rm -rf untracked/docs/reference/html
|
||||
rm untracked/docs/reference/cairomm-%{apiver}.tag \
|
||||
untracked/docs/reference/cairomm-%{apiver}.devhelp2
|
||||
%if %{with doc_pdf}
|
||||
# We enable the Doxygen PDF documentation as a lesser substitute. We must
|
||||
# enable GENERATE_LATEX and LATEX_BATCHMODE; the rest are precautionary and
|
||||
# should already be set as we like them.
|
||||
sed -r -i \
|
||||
-e "s/^([[:blank:]]*(GENERATE_LATEX|LATEX_BATCHMODE|USE_PDFLATEX|\
|
||||
PDF_HYPERLINKS)[[:blank:]]*=[[:blank:]]*)NO[[:blank:]]*/\1YES/" \
|
||||
-e "s/^([[:blank:]]*(LATEX_TIMESTAMP)\
|
||||
[[:blank:]]*=[[:blank:]]*)YES[[:blank:]]*/\1NO/" \
|
||||
docs/reference/Doxyfile.in
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
@ -139,6 +144,10 @@ rm untracked/docs/reference/cairomm-%{apiver}.tag \
|
||||
-Dwarnings=max
|
||||
%meson_build
|
||||
|
||||
%if %{with doc_pdf}
|
||||
%make_build -C '%{_vpath_builddir}/docs/reference/latex'
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
@ -147,9 +156,11 @@ install -t %{buildroot}%{_docdir}/cairomm-%{apiver} -m 0644 -p \
|
||||
AUTHORS ChangeLog MAINTAINERS NEWS README
|
||||
cp -rp examples %{buildroot}%{_docdir}/cairomm-%{apiver}/
|
||||
|
||||
# Unbundle jquery inserted by Doxygen
|
||||
ln -svf '%{_jsdir}/jquery/3/jquery.js' \
|
||||
'%{buildroot}%{_docdir}/cairomm-%{apiver}/reference/html/'
|
||||
rm -vrf '%{buildroot}%{_docdir}/cairomm-%{apiver}/reference/html'
|
||||
%if %{with doc_pdf}
|
||||
install -t '%{buildroot}%{_docdir}/cairomm-%{apiver}/reference' -p -m 0644 \
|
||||
'%{_vpath_builddir}/docs/reference/latex/refman.pdf'
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
@ -172,7 +183,8 @@ ln -svf '%{_jsdir}/jquery/3/jquery.js' \
|
||||
|
||||
%files doc
|
||||
%license COPYING
|
||||
%doc %{_docdir}/cairomm-%{apiver}/
|
||||
# Note: HTML reference manual has been removed. See comment in %%install.
|
||||
%doc %{_docdir}/cairomm-%{apiver}
|
||||
%doc %{_datadir}/devhelp/
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user