chromium/remoting/host/installer/linux/BUILD.gn

# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/zip.gni")
import("//remoting/build/config/remoting_build.gni")
import("//remoting/remoting_locales.gni")
import("//remoting/remoting_options.gni")

build_deb_script = "build_deb.py"
deb_filename =
    "$root_build_dir/" + exec_script(build_deb_script,
                                     [
                                       "-p",
                                       "-s",
                                       rebase_path("//", root_build_dir),
                                     ],
                                     "string",
                                     [ "build-deb.sh" ])
changes_filename =
    "$root_build_dir/" + get_path_info(deb_filename, "name") + ".changes"

packaging_outputs = [
  deb_filename,
  changes_filename,
]

zip("remoting_me2me_host_archive") {
  # Store the installer package(s) into a zip file so there is a
  # consistent filename to reference for build archiving (i.e. in
  # FILES.cfg). This also avoids possible conflicts with "wildcard"
  # package handling in other build/signing scripts.
  inputs = packaging_outputs
  output = "$root_build_dir/remoting-me2me-host-linux.zip"
  deps = [ ":remoting_me2me_host_copy" ]
}

copy("remoting_me2me_host_copy") {
  # Copy the debian package file, which has version info in it,
  # to a consistewnt filename for use on Chromoting swarming bots.
  sources = [ deb_filename ]
  outputs = [ "$root_build_dir/remoting-me2me-host.deb" ]
  public_deps = [ ":remoting_me2me_host_deb_installer" ]
}

action("remoting_me2me_host_deb_installer") {
  script = build_deb_script
  inputs = [
    build_deb_script,
    "Makefile",
    "debian/chrome-remote-desktop.init",
    "debian/chrome-remote-desktop.pam",
    "debian/compat",
    "debian/control",
    "debian/copyright",
    "debian/postinst",
    "debian/postrm",
    "debian/preinst",
    "debian/prerm",
    "debian/rules",
    "debian/triggers",

    # Files to be packaged into the deb.
    "//remoting/host/installer/linux/Xsession",
    "//remoting/host/installer/linux/is-remoting-session",
    "//remoting/host/linux/configure_url_forwarder.py",
    "//remoting/host/linux/linux_me2me_host.py",
    "//remoting/host/linux/pipewire.conf.template",
    "//remoting/host/linux/pipewire-media-session.conf.template",
    "//remoting/host/linux/pipewire-pulse.conf.template",
    "//remoting/host/linux/wireplumber.conf.template",
    "$root_gen_dir/remoting/CREDITS.txt",
    "$root_out_dir/icudtl.dat",
    "$root_out_dir/libremoting_core.so",
    "$root_out_dir/remote_assistance_host",
    "$root_out_dir/remote_open_url",
    "$root_out_dir/remote_webauthn",
    "$root_out_dir/remoting_crash_uploader",
    "$root_out_dir/remoting_me2me_host",
    "$root_out_dir/remoting_native_messaging_host",
    "$root_out_dir/remoting_start_host",
    "$root_out_dir/remoting_user_session",
    "$root_out_dir/remoting/com.google.chrome.remote_assistance-firefox.json",
    "$root_out_dir/remoting/com.google.chrome.remote_assistance.json",
    "$root_out_dir/remoting/com.google.chrome.remote_desktop-firefox.json",
    "$root_out_dir/remoting/com.google.chrome.remote_desktop.json",
    "$root_out_dir/remoting/com.google.chrome.remote_webauthn.json",
    "$root_out_dir/remoting/crd-url-forwarder.desktop",
  ]

  inputs += process_file_template(
          remoting_locales,
          [ "$root_gen_dir/remoting/resources/{{source_name_part}}.pak" ])

  outputs = packaging_outputs
  sources = [ "build-deb.sh" ]
  args = [
    "-s",
    rebase_path("//", root_build_dir),
    "-o",
    ".",
  ]
  inputs += [ "//remoting/host/installer/linux/[email protected]" ]

  deps = [
    "//remoting/host:remoting_core",
    "//remoting/host:remoting_me2me_host",
    "//remoting/host:remoting_native_messaging_host",
    "//remoting/host:remoting_native_messaging_manifests",
    "//remoting/host:remoting_start_host",
    "//remoting/host/crash:remoting_crash_uploader",
    "//remoting/host/installer:credits",
    "//remoting/host/it2me:remote_assistance_host",
    "//remoting/host/linux:remoting_user_session",
    "//remoting/host/linux:url_forwarder_desktop_entry",
    "//remoting/host/remote_open_url",
    "//remoting/host/webauthn:remote_webauthn",
    "//remoting/resources",
    "//third_party/icu:icudata",
  ]
}