Use macros and remove EPEL5-specific parts