Hacking stuff to handle RPM specfiles is not as easy as I thought. I have to write a parser for all those macros and them handle them the way I am needing here...
As a lazy guy, I've done my homework and looked at CPAN for modules, but there are only modules to work with RPM databases, rpm files, etc. No module to work with the SPEC file.
I got to put my hands to work... But, with all the other things I'm also doing, this will be done with 'nice 20'... unfortunately.