| # 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("//build/package.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| source_set("lib") { |
| sources = [ "service.cc" ] |
| public_deps = [ |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//src/sys/lib/chrealm", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "sshd-host" |
| |
| sources = [ "sshd-host.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/fdio", |
| ] |
| } |
| |
| package("sshd-host") { |
| deprecated_shell = true |
| |
| deps = [ |
| ":bin", |
| "//third_party/openssh-portable:hostkeygen", |
| "//third_party/openssh-portable:scp", |
| "//third_party/openssh-portable:sftp-server", |
| "//third_party/openssh-portable:sshd", |
| ] |
| |
| binaries = [ |
| { |
| name = "sshd-host" |
| }, |
| { |
| name = "hostkeygen" |
| }, |
| { |
| name = "scp" |
| }, |
| { |
| name = "sftp-server" |
| }, |
| { |
| name = "sshd" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/sshd-host.cmx") |
| dest = "sshd-host.cmx" |
| }, |
| ] |
| |
| # Used by programs that need to load ICU locale data, such as tz-util. |
| resources = [ |
| { |
| path = rebase_path("//third_party/icu/common/icudtl.dat") |
| dest = "icudtl.dat" |
| }, |
| ] |
| } |
| |
| config_data("config") { |
| for_pkg = "sshd-host" |
| sources = |
| [ rebase_path("//third_party/openssh-portable/fuchsia/sshd_config") ] |
| outputs = [ "sshd_config" ] |
| } |
| |
| executable("test") { |
| testonly = true |
| |
| output_name = "sshd-host-test" |
| |
| sources = [ "test.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| test_package("sshd-host-tests") { |
| deps = [ ":test" ] |
| |
| tests = [ |
| { |
| name = "sshd-host-test" |
| environments = basic_envs |
| }, |
| ] |
| } |