blob: c8e5dbe3845fc24c58e2b38baa5034adef078933 [file] [log] [blame]
# Copyright 2017 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
import("//build/host.gni")
import("//build/package.gni")
go_library("pm_lib") {
name = "fuchsia.googlesource.com/pm"
deps = [
"//garnet/go/src/far",
"//garnet/go/src/merkle",
"//garnet/go/src/sse",
"//garnet/public/go/third_party:github.com/flynn/go-tuf",
"//garnet/public/go/third_party:golang.org/x/crypto",
]
}
test_packages = [
"build",
"cmd/pm/genkey",
"keys",
"repo",
]
foreach(pkg, test_packages) {
pkg_ = string_replace(pkg, "/", "_")
name = "pm_${pkg_}_test"
go_test(name) {
gopackage = "fuchsia.googlesource.com/pm/${pkg}"
deps = [
":pm_lib",
]
}
}
go_binary("pm_bin") {
output_name = "pm"
gopackage = "fuchsia.googlesource.com/pm/cmd/pm"
sdk_category = "partner"
deps = [
":pm_lib",
]
}
package("pm") {
deps = [
":pm_bin",
]
binaries = [
{
name = "pm"
shell = true
},
]
}
install_host_tools("host") {
deps = [
":pm_bin",
]
outputs = [
"pm",
]
}