| # Copyright 2018 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/config.gni") |
| import("//src/sys/build/components.gni") |
| |
| source_set("lib") { |
| sources = [ "service.cc" ] |
| public_deps = [ |
| "//sdk/fidl/fuchsia.boot", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//src/sys/lib/chrealm", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "sshd-host" |
| |
| sources = [ "sshd-host.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//sdk/lib/fdio", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| resource("sshd-host-resources") { |
| sources = [ "//third_party/icu/common/icudtl.dat" ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_package_with_single_component("sshd-host") { |
| manifest = "meta/sshd-host.cmx" |
| deps = [ |
| ":bin", |
| |
| # Used by programs that need to load ICU locale data, such as tz-util. |
| ":sshd-host-resources", |
| "//build/validate:non_production_tag", |
| "//third_party/openssh-portable:hostkeygen", |
| "//third_party/openssh-portable:scp", |
| "//third_party/openssh-portable:sftp-server", |
| "//third_party/openssh-portable:sshd", |
| ] |
| } |
| |
| config_data("config") { |
| for_pkg = "sshd-host" |
| sources = [ "//third_party/openssh-portable/fuchsia/sshd_config" ] |
| outputs = [ "sshd_config" ] |
| } |
| |
| executable("test") { |
| testonly = true |
| |
| output_name = "sshd-host-test" |
| |
| sources = [ "test.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.boot", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:unit", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| } |
| |
| fuchsia_unittest_package("sshd-host-tests") { |
| manifest = "meta/sshd-host-test.cmx" |
| deps = [ ":test" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |