blob: ce247d22fb5a65b71459f0e935d1edeeab8fc2d5 [file] [log] [blame]
# Copyright 2016 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="59ebfc90c93790a5404b575336c128369910d81e"
CROS_WORKON_TREE=("106feab4dda3db44a9ac6743f7e67097731522b0" "689fa9b9751fad93fb0b135f354084d639b317ac" "ca37db968bad8c6e5a32fa92578fefb49534a4f3" "3927ce0ef74808ba93ee3662bacc36873a533a72" "bdd0506d02f0d5d832f36c6d468326f8f98e96b2")
CROS_WORKON_PROJECT="apps/libapps"
CROS_WORKON_LOCALNAME="third_party/libapps"
CROS_WORKON_SUBTREE="libdot hterm nassh ssh_client terminal"
inherit cros-workon
DESCRIPTION="The Chromium OS Shell extension (the HTML/JS rendering part)"
HOMEPAGE="https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/chromeos-crosh.md"
# These are kept in sync with libdot.py settings.
FONTS_HASHES=(
# Current one.
d6dc5eaf459abd058cd3aef1e25963fde893f9d87f5f55f340431697ce4b3506
# Next one.
d6dc5eaf459abd058cd3aef1e25963fde893f9d87f5f55f340431697ce4b3506
)
NPM_HASHES=(
# Current one.
2cd2dd365999ae139b6b0fb62a5a09e2a7fb5ab1c0926cf1968a1dec9b74fea5
# Next one.
16e0b36c0c3d448c7fd00d1db3ba27ff8477007fb4b0eae31ae25960aeae3fbc
)
PLUGIN_VERSIONS=(
# Current one.
0.41
# Next one.
0.42
)
SRC_URI="
https://storage.googleapis.com/chromium-nodejs/14.15.4/b2e40ddbac04d05baafbb007f203c6663c9d4ca9
$(printf 'https://storage.googleapis.com/chromeos-localmirror/secureshell/distfiles/fonts-%s.tar.xz ' \
"${FONTS_HASHES[@]}")
$(printf 'https://storage.googleapis.com/chromeos-localmirror/secureshell/distfiles/node_modules-%s.tar.xz ' \
"${NPM_HASHES[@]}")
$(printf 'https://storage.googleapis.com/chromeos-localmirror/secureshell/releases/%s.tar.xz ' \
"${PLUGIN_VERSIONS[@]}")
"
# The archives above live on Google maintained sites.
RESTRICT="nomirror"
LICENSE="BSD-Google"
SLOT="0/0"
KEYWORDS="*"
IUSE=""
RDEPEND="!<chromeos-base/common-assets-0.0.2"
e() {
echo "$@"
"$@" || die
}
src_compile() {
export VCSID="${CROS_WORKON_COMMIT:-${PF}}"
e ./nassh/bin/mkdist --crosh-only
}
src_install() {
local dir="/usr/share/chromeos-assets/crosh_builtin"
dodir "${dir}"
unzip -d "${D}${dir}" nassh/dist/crosh.zip || die
local pnacl="${D}${dir}/plugin/pnacl"
if ! use arm ; then
rm "${pnacl}/ssh_client_nl_arm.nexe"* || die
fi
if ! use x86 ; then
rm "${pnacl}/ssh_client_nl_x86_32.nexe"* || die
fi
if ! use amd64 ; then
rm "${pnacl}/ssh_client_nl_x86_64.nexe"* || die
fi
}