blob: d74411075577739cf9cf04c849faca5e250850b8 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="b05e4a6b92b2cfe608b6cd8d5d37168680fc080e"
CROS_WORKON_TREE=("52a8a8b6d3bbca5e90d4761aa308a5541d52b1bb" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk touch_keyboard .gn"
PLATFORM_SUBDIR="touch_keyboard"
inherit cros-workon platform user
DESCRIPTION="Touch Keyboard"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/touch_keyboard/"
SRC_URI=""
LICENSE="BSD-Google"
SLOT="0/0"
KEYWORDS="*"
IUSE=""
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
}