Fix various issues related to building RPMs
Created by: brettle
Some of these commits are the same as what was included in the recent PRs from @marvelous, but I've merged with your latest master so there shouldn't be any conflicts.
With these changes and the enki PR I recently submitted, RPMs are successfully building on Fedora 20, 21, and 22 and OpenSUSE 13.1 and 13.2. Repositories are available here.