File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,9 @@ GUIDE_PAGES_INST = \
142142
143143noinst_DATA += $(GUIDE_PAGES_INST)
144144
145+ # Some distros don't have asciidoctor and we need to prebundle the docs, e.g. RHEL & CentOS
146+ EXTRA_DIST += $(GUIDE_PAGES_INST)
147+
145148GUIDE_ASCIIDOC_ARGS = \
146149 -a cockpit-version=$(VERSION) \
147150 -a toc=left \
Original file line number Diff line number Diff line change @@ -116,11 +116,9 @@ BuildRequires: nodejs
116116BuildRequires: nodejs-esbuild
117117%endif
118118
119- # For documentation
120- %if 0%{?rhel } || 0%{?centos }
121- # Only has legacy asciidoc-py and not asciidoctor.
122- # asciidoc-py includes a2x package which can generate man-pages.
123- BuildRequires: asciidoc
119+ # to avoid using asciidoc-py in RHEL and CentOS we use the prebuilt docs
120+ %if 0%{?rhel }
121+ %define bundle_docs 1
124122%else
125123BuildRequires: asciidoctor
126124%endif
@@ -187,6 +185,9 @@ NODE_ENV=production NODE_PATH=/usr/lib/node_modules:$(echo /usr/lib/node_modules
187185%if %{enable_multihost }
188186 --enable-multihost \
189187%endif
188+ %if %{defined bundle_docs }
189+ --disable-doc \
190+ %endif
190191
191192%make_build
192193
@@ -210,6 +211,12 @@ install -p -m 644 %{pamconfig} $RPM_BUILD_ROOT%{pamconfdir}/cockpit
210211rm -f %{buildroot }/%{_libdir }/cockpit/*.so
211212install -D -p -m 644 AUTHORS COPYING README.md %{buildroot }%{_docdir }/cockpit/
212213
214+ # We install the upstream pre-built docs as we can't build them
215+ %if %{defined bundle_docs }
216+ %define docbundledir doc/output/html
217+ install -D -p -m 644 %{docbundledir } %{buildroot }%{_docdir }/cockpit/
218+ %endif
219+
213220# Build the package lists for resource packages
214221# cockpit-bridge is the basic dependency for all cockpit-* packages, so centrally own the page directory
215222echo '%dir %{_datadir }/cockpit' > base.list
You can’t perform that action at this time.
0 commit comments