RPM build helper

I've had to create my own custom salt RPMs a couple of times now and I've found the attached script helpful. So I thought I'd share.