blob: 32a50ac288824b6157ee0766667e6768d20ecf6f [file] [log] [blame]
# Copyright 2018 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" "c32304deb35379c3f97bd205f85b111ef29079ed")
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_SUBTREE="common-mk bluetooth"
PLATFORM_SUBDIR="bluetooth"
inherit cros-workon platform
DESCRIPTION="Bluetooth service for Chromium OS"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/bluetooth"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE="seccomp"
RDEPEND="
chromeos-base/libbrillo
net-wireless/bluez"
DEPEND="${RDEPEND}
chromeos-base/system_api"
src_install() {
dobin "${OUT}"/btdispatch
dobin "${OUT}"/newblued
insinto /etc/dbus-1/system.d
doins dbus/org.chromium.Bluetooth.conf
doins dbus/org.chromium.Newblue.conf
insinto /etc/init
doins init/upstart/btdispatch.conf
if use seccomp; then
# Install seccomp policy files.
insinto /usr/share/policy
newins "seccomp_filters/btdispatch-seccomp-${ARCH}.policy" btdispatch-seccomp.policy
newins "seccomp_filters/newblued-seccomp-${ARCH}.policy" newblued-seccomp.policy
else
# Remove seccomp flags from minijail parameters.
sed -i '/^env seccomp_flags=/s:=.*:="":' "${ED}"/etc/init/btdispatch.conf || die
fi
}
platform_pkg_test() {
platform_test "run" "${OUT}/btdispatch_test"
}