Refactor spec file and make rhel rpms work again.

Refs #4075