add buildrpm and fix package(name|dir)