public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/meson] f44: Build and install meson-reference(3)
@ 2026-07-11 12:50 Robin Jarry
  0 siblings, 0 replies; only message in thread
From: Robin Jarry @ 2026-07-11 12:50 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/meson
            Branch : f44
            Commit : 045fbb68f3847e6ec0665993f6952aa99d690c11
            Author : Robin Jarry <rjarry@redhat.com>
            Date   : 2026-04-26T15:04:54+02:00
            Stats  : +20/-1 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/meson/c/045fbb68f3847e6ec0665993f6952aa99d690c11?branch=f44

            Log:
            Build and install meson-reference(3)

The meson online reference manual can be painfully slow to browse.
Build and install the man3 reference page locally so that it is
available offline via `man meson-reference`.

Add a new %bcond docs toggle (enabled by default) that drives the
documentation build using meson's own build system.

Signed-off-by: Robin Jarry <rjarry@redhat.com>

---
diff --git a/meson.spec b/meson.spec
index 0481400..54a3b1e 100644
--- a/meson.spec
+++ b/meson.spec
@@ -1,6 +1,7 @@
 %global libname mesonbuild
 
 %bcond check 1
+%bcond docs 1
 
 Name:           meson
 Version:        1.11.1
@@ -16,8 +17,13 @@ BuildArch:      noarch
 BuildRequires:  python3-devel
 Requires:       ninja-build
 
-%if %{with check}
+%if %{with docs}
+BuildRequires:  python3-pyyaml
+%endif
+%if %{with check} || %{with docs}
 BuildRequires:  ninja-build
+%endif
+%if %{with check}
 # Some tests expect the unversioned executable
 BuildRequires:  /usr/bin/python
 # Various languages
@@ -114,10 +120,20 @@ sed -i -e "/^%%__meson /s| .*$| %{_bindir}/%{name}|" data/macros.%{name}
 %build
 %pyproject_wheel
 
+%if %{with docs}
+%{python3} ./meson.py setup docs docs.build \
+	--prefix=%{_prefix} --mandir=%{_mandir} -Dhtml=false -Dunsafe_yaml=true
+%{python3} ./meson.py compile -C docs.build
+%endif
+
 %install
 %pyproject_install
 %pyproject_save_files -l mesonbuild
 
+%if %{with docs}
+%{python3} ./meson.py install -C docs.build --destdir=%{buildroot}
+%endif
+
 install -Dpm0644 -t %{buildroot}%{rpmmacrodir} data/macros.%{name}
 install -Dpm0644 -t %{buildroot}%{_datadir}/bash-completion/completions/ data/shell-completions/bash/meson
 install -Dpm0644 -t %{buildroot}%{_datadir}/zsh/site-functions/ data/shell-completions/zsh/_meson
@@ -132,6 +148,9 @@ export MESON_PRINT_TEST_OUTPUT=1
 %license COPYING
 %{_bindir}/%{name}
 %{_mandir}/man1/%{name}.1*
+%if %{with docs}
+%{_mandir}/man3/%{name}-reference.3*
+%endif
 %{rpmmacrodir}/macros.%{name}
 %dir %{_datadir}/polkit-1
 %dir %{_datadir}/polkit-1/actions

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-11 12:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-11 12:50 [rpms/meson] f44: Build and install meson-reference(3) Robin Jarry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox