Yes, this does work :-) I just stole it from the bdist_rpm source.