Actually I thought that something like rpm -q --queryformat "%{SOURCE}\n" --specfile path/to/specfile.spec will do the job, but it seems that doesn't work.
Nils Philippsen wrote:
Now that I have your attention,
to put an end to this discussion I have coded a small perl script which
is able to download or (human-legibly) list the sources and patches in a
spec file, even if they contain macros, well even if they're
conditionalized beyond all recognition. It does this by using RPM for
the parsing of the macros etc. and so should be able to cope with most
spec files.