RPM spec files have many special variables available within them. Do any of these variables expose the name of the current package being processed?
For single-package RPMs, the answer would be obvious, but a single spec can also produce multiple RPMs. Is there a variable, such as $RPM_PACKAGE_NAME, that rpmbuild automatically updates to align with the current %files or %pre or %post section?