Which man page describes the usage of the top-level RPM spec file macros that are defined in RPM source files directly? I mean, %setup, %buildroot and the like, which are not in /usr/lib/rpm. Looking up the %setup options in a tutorial at rpm.org or searching through the source code isn't best of convenience.
The Fedora Project hosts the best documentation on RPM out there in html format:
Prior to these resources, my go to guide was Maximum RPM (which you also found):
Some of them are documented in Maximum RPM, Taking the RPM Package Manager to the Limit by Edward C. Bailey.
Section Macros: Helpful Shorthand for Package Builders describes %setup and %patch macros.
It's crazy that there is no fundamental public reference for the .spec file format which have been heavily used by multiple distributions for more than a decade.
You can jam a
%dump into your spec and then try building (redirect stderr out to a file). Depending on where you put the
%dump you get whatever macros existed at that moment. This is not a substitute for real documentation... but might keep you going.