Split into build/package scripts

Change-Id: I54dc6f7af9d17544bf3cdd208356c69b2d92f25a