Add macros for declarative buildsystems of rpm >= 4.20
In rpm >= 4.201, a new feature Declarative Buildsystem2 will be introduced to simplify spec files. I think we should add support on it.
This file is maintained by @ignatenkobrain. @DaanDeMeyer @keszybz have demonstrated interest as stakeholders in the past.
Please review (since none of the meson core maintainers know the first thing about rpm, as far as I know :D)
For related work, see https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/455.
$ git --no-pager range-diff --creation-factor=90 origin/master c07d82dd76f9af01240e8574449bfafb4526451e HEAD
1: c07d82dd7 ! 1: 0ff4579df Add macros for declarative buildsystems of rpm >= 4.20
@@ data/macros.meson
--print-errorlogs \
%{nil}}
+
-+# Macros for declarative buildsystems of rpm >= 4.20
-+%buildsystem_meson_conf %meson
-+%buildsystem_meson_build %meson_build
-+%buildsystem_meson_install %meson_install
-+%buildsystem_meson_check %meson_test
++# Declarative buildsystem, requires RPM 4.20+ to work
++# https://rpm-software-management.github.io/rpm/manual/buildsystem.html
++%buildsystem_meson_conf() %meson %*
++%buildsystem_meson_generate_buildrequires() %{nil}
++%buildsystem_meson_build() %meson_build %*
++%buildsystem_meson_install() %meson_install %*
++%buildsystem_meson_check() %meson_test %*
As discussed above, I am one of those people who know nothing about RPM. So is this now ready for merging?
@pmatilai WDYT?
LGTM, adding milestone since it doesn't really affect usage of Meson itself.