67 tarroot = 'dart-%s' % version
68 origtarname = 'dart_%s.orig.tar.gz' % version
69
70 if not exists(tarball):
71 print(
'Source tarball not found')
72 return -1
73
75 origtarball =
join(temp_dir, origtarname)
76 copyfile(tarball, origtarball)
77
78 with tarfile.open(origtarball) as tar:
79 tar.extractall(path=temp_dir)
80
81
82 print(
"Building source package")
84
85
86 for arch in arches:
87 print(
"Building %s package" % arch)
89 ['-B', '-a', GN_ARCH_TO_DEBIAN_ARCH[arch], '-us', '-uc'],
90 join(temp_dir, tarroot))
91
92
93 debbase = 'dart_%s' % version
94 source_package = [
95 '%s-1.dsc' % debbase,
96 '%s.orig.tar.gz' % debbase,
97 '%s-1.debian.tar.xz' % debbase
98 ]
99 for name in source_package:
100 copyfile(
join(temp_dir, name),
join(out_dir, name))
101 for arch in arches:
102 name = '%s-1_%s.deb' % (debbase, GN_ARCH_TO_DEBIAN_ARCH[arch])
103 copyfile(
join(temp_dir, name),
join(out_dir, name))
104
105
def RunBuildPackage(opt, cwd, toolchain=None)
def BuildDebianPackage(tarball, out_dir, arches, toolchain)
def print(*args, **kwargs)
def GetVersion(no_git_hash=False, version_file=None, git_revision_file=None)
static SkString join(const CommandLineFlags::StringArray &)