blob: 7eedb1aae7895e014149ce705bba5fb8144c7299 [file] [log] [blame]
# Copyright 2022 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="dbb1136242ba822d539eaf11493f3b68815adb7f"
CROS_WORKON_TREE=("60fa47aebd6ebfb702012849bd560717fceddcd4" "1dbf281b6523338c1a11135ebaf00796f0f664e4" "58bdeaa3004ba5dc3bf524c1d0a3d444f4984d28" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_SUBTREE="common-mk libec rgbkbd .gn"
CROS_WORKON_OUTOFTREE_BUILD=1
PLATFORM_SUBDIR="rgbkbd"
inherit cros-workon platform tmpfiles user udev
DESCRIPTION="A daemon for controlling an RGB backlit keyboard."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/rgbkbd/"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE=""
RDEPEND=""
DEPEND="
${RDEPEND}
chromeos-base/libec:=
chromeos-base/system_api:=
"
pkg_preinst() {
# Ensure that this group exists so that rgbkbd can access /dev/cros_ec.
enewgroup "cros_ec-access"
# Create user and group for RGBKBD.
enewuser "rgbkbd"
enewgroup "rgbkbd"
}
src_install() {
platform_install
# Create tmpfiles for testing.
dotmpfiles tmpfiles.d/rgbkbd.conf
udev_dorules udev/*.rules
if use fuzzer; then
local fuzzer_component_id="1131926"
platform_fuzzer_install "${S}"/OWNERS \
"${OUT}"/rgb_daemon_fuzzer \
--comp "${fuzzer_component_id}"
fi
}
platform_pkg_test() {
platform test_all
}