| # 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/components.gni") |
| import("//build/config.gni") |
| import("//build/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/go/toolchain.gni") |
| import("//build/host.gni") |
| import("//build/images/manifest.gni") |
| import("//src/go/grand_unified_binary/gub.gni") |
| |
| go_library("lib") { |
| name = "go.fuchsia.dev/fuchsia/src/sys/pkg/bin/amber/..." |
| deps = [ |
| "//sdk/fidl/fuchsia.pkg($go_toolchain)", |
| "//sdk/fidl/fuchsia.pkg.rewrite($go_toolchain)", |
| "//sdk/fidl/fuchsia.space($go_toolchain)", |
| "//sdk/fidl/fuchsia.sys($go_toolchain)", |
| "//sdk/fidl/fuchsia.update($go_toolchain)", |
| "//src/lib/syslog/go", |
| ] |
| |
| sources = [ |
| "amberctl/amberctl.go", |
| "urlscope/urlscope.go", |
| "urlscope/urlscope_test.go", |
| ] |
| } |
| |
| grand_unified_binary("bin") { |
| output_name = "amberctl" |
| } |
| |
| fuchsia_component("component") { |
| component_name = "amberctl" |
| deps = [ ":bin" ] |
| manifest = "meta/amberctl.cmx" |
| } |
| |
| # TODO(raggi): remove the underscore version of the command name once all |
| # docs and scripts have been updated. |
| # See https://fuchsia-review.googlesource.com/c/fuchsia/+/255274. |
| grand_unified_binary("bin_underscore") { |
| output_name = "amber_ctl" |
| visibility = [ ":*" ] |
| } |
| |
| fuchsia_shell_package("amberctl") { |
| deps = [ |
| ":bin_underscore", |
| ":component", |
| ] |
| } |
| |
| go_test("amber_urlscope_test") { |
| gopackages = [ "go.fuchsia.dev/fuchsia/src/sys/pkg/bin/amber/urlscope" ] |
| |
| deps = [ |
| ":lib", |
| "//src/sys/pkg/bin/pkgfs:pmd", |
| "//src/sys/pkg/bin/pm:pm_lib", |
| "//third_party/golibs:github.com/google/go-cmp", |
| ] |
| } |
| |
| fuchsia_unittest_package("amber_tests") { |
| deps = [ ":amber_urlscope_test" ] |
| } |
| |
| # Retained for //garnet/packages/config:amber |
| config_data("config") { |
| for_pkg = "sysmgr" |
| outputs = [ "amber.config" ] |
| sources = [ "startup.config" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":amber_tests" ] |
| } |