public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/meson] f45: Split out -srpm-macros subpackage
@ 2026-09-07 18:43 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-09-07 18:43 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/meson
            Branch : f45
            Commit : 80d8cbfe21ead64ca11ad98edee55ed72d65e1f0
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@amutable.com>
            Date   : 2026-09-07T20:43:33+02:00
            Stats  : +14/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/meson/c/80d8cbfe21ead64ca11ad98edee55ed72d65e1f0?branch=f45

            Log:
            Split out -srpm-macros subpackage

... (rhbz#2529483)

By itself, this is generally a noop. The main package requires pulls
in the subpackage, so packages that have 'BR: meson' continue to build
fine. OTOH, packages can do 'BR: meson-srpm-macros' and then they get
meson pulled in automatically. To make this work without an explicit
BR, the subpackage will need to be pulled in from some something else,
most likely redhat-rpm-config.

---
diff --git a/meson.spec b/meson.spec
index 92aabe4..f5eeaac 100644
--- a/meson.spec
+++ b/meson.spec
@@ -17,6 +17,8 @@ BuildArch:      noarch
 BuildRequires:  python3-devel
 Requires:       ninja-build
 
+Requires:       meson-srpm-macros = %{version}-%{release}
+
 %if %{with docs}
 BuildRequires:  python3-pyyaml
 %endif
@@ -112,10 +114,18 @@ productivity. It aims to do this by providing simple, out-of-the-box
 support for modern software development tools and practices, such as
 unit tests, coverage reports, Valgrind, CCache and the like.
 
+%package srpm-macros
+Summary:        rpm macros to build projects using meson
+
+%description srpm-macros
+This package contains %{summary}.
+
 %prep
-%autosetup -p1 -n meson-%{version_no_tilde %{quote:}}
+%autosetup -p1 -C
 # Macro should not change when we are redefining bindir
 sed -i -e "/^%%__meson /s| .*$| %{_bindir}/%{name}|" data/macros.%{name}
+# Automatically pull in meson if the build system is used
+sed -i -e '/^%%buildsystem_meson_generate_buildrequires/s|%%{nil}|echo "meson"|' data/macros.%{name}
 
 %build
 %pyproject_wheel
@@ -150,12 +160,14 @@ export MESON_PRINT_TEST_OUTPUT=1
 %if %{with docs}
 %{_mandir}/man3/%{name}-reference.3*
 %endif
-%{rpmmacrodir}/macros.%{name}
 %dir %{_datadir}/polkit-1
 %dir %{_datadir}/polkit-1/actions
 %{_datadir}/polkit-1/actions/com.mesonbuild.install.policy
 %{_datadir}/bash-completion/completions/meson
 %{_datadir}/zsh/site-functions/_meson
 
+%files srpm-macros
+%{rpmmacrodir}/macros.%{name}
+
 %changelog
 %autochangelog

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

only message in thread, other threads:[~2026-09-07 18:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-07 18:43 [rpms/meson] f45: Split out -srpm-macros subpackage 

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