Try conditional expansion of macro in spec file
See http://backreference.org/2011/09/17/some-tips-on-rpm-conditional-macros/
for a discussion.