40acd32778
Change-Id: Ie7d184dfe1694985fdff318736f34b45267a5bf3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509141 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
49 lines
1.7 KiB
Plaintext
49 lines
1.7 KiB
Plaintext
# Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
if (is_linux) {
|
|
action("debian_package") {
|
|
version = exec_script("get_version.py", [], "trim string")
|
|
timestamp = exec_script("get_timestamp.py", [], "trim string")
|
|
if (target_cpu == "x86" || target_cpu == "ia32") {
|
|
debian_arch = "i386"
|
|
lib_dir = "//buildtools/sysroot/linux/lib/i386-linux-gnu"
|
|
} else if (target_cpu == "x64") {
|
|
debian_arch = "amd64"
|
|
lib_dir = "//buildtools/sysroot/linux/lib/x86_64-linux-gnu"
|
|
} else if (target_cpu == "arm") {
|
|
debian_arch = "armhf"
|
|
lib_dir = "//buildtools/sysroot/linux/lib/arm-linux-gnueabihf"
|
|
} else if (target_cpu == "arm64") {
|
|
debian_arch = "arm64"
|
|
lib_dir = "//buildtools/sysroot/linux/lib/aarch64-linux-gnu"
|
|
} else if (target_cpu == "riscv64") {
|
|
debian_arch = "riscv64"
|
|
lib_dir = "//buildtools/sysroot/focal/lib/riscv64-linux-gnu/"
|
|
} else {
|
|
assert(false, "Don't know Debian name for $target_cpu")
|
|
}
|
|
|
|
deps = [ "../../sdk:create_sdk" ]
|
|
inputs = [
|
|
"create_debian_package.py",
|
|
"debian/compat",
|
|
"debian/control",
|
|
"debian/dart.install",
|
|
"debian/dart.links",
|
|
"debian/rules",
|
|
"debian/source/format",
|
|
]
|
|
outputs = [ "$root_out_dir/dart_${version}-1_${debian_arch}.deb" ]
|
|
script = "../../build/gn_run_binary.py"
|
|
args = [
|
|
rebase_path("create_debian_package.py"),
|
|
"--version=$version",
|
|
"--timestamp=$timestamp",
|
|
"--arch=$debian_arch",
|
|
"--lib_dir=" + rebase_path(lib_dir),
|
|
]
|
|
}
|
|
}
|