File declarative-autotools.diff of Package rpm
--- macros.in.orig 2025-02-19 16:29:33.000000000 +0100
+++ macros.in 2026-03-05 02:39:04.433319176 +0100
@@ -1087,6 +1087,17 @@
install
#------------------------------------------------------------------------------
+# Declarative build macros for autotools
+# Taken verbatim from docs/manual/buildsystem.md except for an additional
+# %%check section that builds the "check" target if available.
+%buildsystem_autotools_conf() %configure %*
+%buildsystem_autotools_build() %make_build %*
+%buildsystem_autotools_install() %make_install %*
+# 0: target is built; 1: target needs rebuild; 2: any error
+%buildsystem_autotools_check() %{__make} -q check; [ $? -ne 2 ] && \
+ %make_build check
+
+#------------------------------------------------------------------------------
%patches %{lua: for i, p in ipairs(patches) do \
print(macros.shescape({p}).." ") end}
%sources %{lua: for i, s in ipairs(sources) do \