Automate rpm build.

Change-Id: Id3c4fe7590fa8c8dff827fa783880acb4beeba70