refactor rpm build