blob: 6953a1906095565a6e2b5bdca8fbc8122de191ee [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
CROS_WORKON_COMMIT="c142078820d0707858873cedb290a78d36f531af"
CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "3a608885c9d4dc5bc5fee48f1bac2c54e75363e1" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk installer .gn"
PLATFORM_SUBDIR="installer"
inherit cros-workon platform systemd
DESCRIPTION="Chrome OS Installer"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/installer/"
SRC_URI=""
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE="cros_embedded cros_host enable_slow_boot_notify -mtd pam systemd test +oobe_config"
COMMON_DEPEND="
chromeos-base/libbrillo:=
chromeos-base/vboot_reference
"
DEPEND="${COMMON_DEPEND}
chromeos-base/verity
dev-libs/openssl:0=
"
RDEPEND="${COMMON_DEPEND}
pam? ( app-admin/sudo )
chromeos-base/chromeos-common-script
!cros_host? (
!cros_embedded? ( chromeos-base/chromeos-storage-info )
oobe_config? ( chromeos-base/oobe_config )
dev-libs/openssl:0=
)
dev-util/shflags
sys-apps/rootdev
sys-apps/util-linux
sys-apps/which
sys-fs/e2fsprogs"
platform_pkg_test() {
platform_test "run" "${OUT}/cros_installer_test"
}
src_install() {
if use cros_host ; then
dosbin chromeos-install
else
dobin "${OUT}"/{cros_installer,cros_oobe_crypto}
if use mtd ; then
dobin "${OUT}"/nand_partition
fi
dosbin chromeos-* encrypted_import "${OUT}"/evwaitkey
dosym usr/sbin/chromeos-postinst /postinst
# Install init scripts.
if use systemd; then
systemd_dounit init/install-completed.service
systemd_enable_service boot-services.target install-completed.service
systemd_dounit init/crx-import.service
systemd_enable_service system-services.target crx-import.service
else
insinto /etc/init
doins init/*.conf
fi
exeinto /usr/share/cros/init
doexe init/crx-import.sh
fi
}