Move generate_build_number into CompiledPackage, add specs for it