| # Copyright 2018 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=6 |
| |
| CROS_WORKON_COMMIT="04e868432acc5184a60297bf9d461a1868b514f7" |
| CROS_WORKON_TREE=("310a710d6c1f02a93504b35b3d8371875f253b6a" "1a5f34f6dffea5bac7495df4b37ec7789c563cc3" "bc17a7c7ba087825297982248dded84291956727" "dc1506ef7c8cfd2c5ffd1809dac05596ec18773c") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| # TODO(crbug.com/809389): Avoid directly including headers from other packages. |
| CROS_WORKON_SUBTREE="common-mk oobe_config libtpmcrypto .gn" |
| |
| PLATFORM_SUBDIR="oobe_config" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="Provides utilities to save and restore OOBE config." |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/oobe_config/" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="" |
| |
| RDEPEND=" |
| chromeos-base/libbrillo |
| chromeos-base/libtpmcrypto |
| dev-libs/openssl |
| sys-apps/dbus |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| chromeos-base/power_manager-client |
| chromeos-base/system_api |
| " |
| |
| pkg_preinst() { |
| enewuser "oobe_config_save" |
| enewuser "oobe_config_restore" |
| enewgroup "oobe_config_save" |
| enewgroup "oobe_config_restore" |
| } |
| |
| src_install() { |
| dosbin "${OUT}"/rollback_prepare_save |
| dosbin "${OUT}"/oobe_config_save |
| dosbin "${OUT}"/oobe_config_restore |
| dosbin "${OUT}"/rollback_finish_restore |
| |
| dosbin "${OUT}"/finish_oobe_auto_config |
| |
| insinto /etc/init |
| doins etc/init/oobe_config_restore.conf |
| |
| insinto /etc/dbus-1/system.d |
| doins etc/dbus-1/org.chromium.OobeConfigRestore.conf |
| |
| # TODO(zentaro): Add secomp filters once implemented. |
| } |
| |
| platform_pkg_test() { |
| local tests=( |
| oobe_config_test |
| ) |
| local test_bin |
| for test_bin in "${tests[@]}"; do |
| platform_test "run" "${OUT}/${test_bin}" |
| done |
| } |