The macros were added to F40 (and hence ELN and RHEL 10) in redhat-rpm-config 264.
The python-rpmautospec package