blob: 3eae8c004e3a49e853ba7f7862baeb6d5a41bc20 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
CROS_WORKON_COMMIT="207b9c95e801b90f6616962cb928bec371aed39f"
CROS_WORKON_TREE=("17f4a6efa079886fb3e23fd256264f932d59721d" "630ac6b415034637e072b89f08c2a091f96b7b10")
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk touch_keyboard"
PLATFORM_SUBDIR="touch_keyboard"
inherit cros-workon platform user
DESCRIPTION="Touch Keyboard"
HOMEPAGE="http://www.chromium.org/"
SRC_URI=""
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE=""
RDEPEND="chromeos-base/libbrillo"
DEPEND="${RDEPEND}"
pkg_preinst() {
# Set up the touch_keyboard user and group, which will be used to run
# touch_keyboard_handler instead of root.
enewuser touch_keyboard
enewgroup touch_keyboard
}
src_install() {
# Install the actual binary that handles the touch keyboard.
dobin "${OUT}/touch_keyboard_handler"
# Install a tool for testing the haptic feedback in the factory.
dobin "${OUT}/touchkb_haptic_test"
# Install an upstart script to start the handler at boot time.
insinto "/etc/init"
doins "touch_keyboard.conf"
# Install the correct seccomp policy for this architecture.
insinto "/opt/google/touch/policies"
doins seccomp/${ARCH}/*.policy
}
platform_pkg_test() {
platform_test "run" "${OUT}"/eventkey_test
platform_test "run" "${OUT}"/slot_test
platform_test "run" "${OUT}"/statemachine_test
platform_test "run" "${OUT}"/evdevsource_test
platform_test "run" "${OUT}"/uinputdevice_test
}