Some fixes to rpm building