public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Robin Jarry <rjarry@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/meson] f44: Build and install meson-reference(3)
Date: Sat, 11 Jul 2026 12:50:19 GMT	[thread overview]
Message-ID: <178377421941.1.7974220226547784629.rpms-meson-045fbb68f384@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-07-11 12:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178377421941.1.7974220226547784629.rpms-meson-045fbb68f384@fedoraproject.org \
    --to=rjarry@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox