I’ve been doing a lot of RPM packaging lately, and on different (and
very old) distros and versions. Sometimes I lose track of all of the
macros used in specfiles (
_bindir _sbindir dist _localstatedir, etc).
There’s no terribly easy way to dump a list of all of the available
macros. There is, however, a bit of a kludge. Insert the following code
in your specfile before the
%dump exit 1
%dump macro will dump all defined macros to STDERR. The
will prevent rpmbuild from going on and trying to build the package. If
you want to view the output nicely, you can pipe it through a pager like
rpmbuild -ba filename.spec 2>&1 | less.
Just make sure to remove those two lines when you want to actually build the package.