| # Copyright 2022 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_COMMIT="8b6e11a069e490c761cdab7ab3ff59434806cd9c" |
| CROS_WORKON_TREE=("41d899585b7a07ea908a0cca2944a7b8a4d13655" "9942607d3de36a375711502f44f44d28aac7bd3a" "88bcc1d39084f5d0a4ca836beaf45c0b55dbc1c3" "67442b9578c0475865b147e940740e227d50027c" "475760c87c0b356465a77ced0cbdd6587bfb9f1d" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_SUBTREE="common-mk chromeos-config libcrossystem libec rgbkbd .gn" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| |
| PLATFORM_SUBDIR="rgbkbd" |
| # Do not run test parallelly until unit tests are fixed. |
| # shellcheck disable=SC2034 |
| PLATFORM_PARALLEL_GTEST_TEST="no" |
| |
| inherit cros-workon cros-unibuild 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/chromeos-config-tools:= |
| chromeos-base/libcrossystem:= |
| chromeos-base/libec:= |
| chromeos-base/system_api:= |
| virtual/udev |
| " |
| |
| BDEPEND=" |
| chromeos-base/chromeos-dbus-bindings |
| chromeos-base/minijail |
| " |
| |
| 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_src_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 |
| } |