refine spec files