| # Copyright 2014 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=6 |
| |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_SUBTREE="common-mk apmanager" |
| |
| PLATFORM_SUBDIR="apmanager" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="Access Point Manager for Chromium OS" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/apmanager/" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="~*" |
| IUSE="" |
| |
| RDEPEND=" |
| chromeos-base/minijail |
| chromeos-base/libbrillo |
| chromeos-base/permission_broker |
| net-dns/dnsmasq |
| net-wireless/hostapd |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| chromeos-base/permission_broker-client |
| chromeos-base/shill |
| " |
| |
| src_install() { |
| dobin "${OUT}"/apmanager |
| # Install init scripts. |
| insinto /etc/init |
| doins init/apmanager.conf |
| |
| # DBus configuration. |
| insinto /etc/dbus-1/system.d |
| doins dbus_permissions/org.chromium.apmanager.conf |
| |
| # Install DBus client library. |
| platform_install_dbus_client_lib |
| |
| # Install seccomp file. |
| insinto /usr/share/policy |
| newins init/apmanager-seccomp-${ARCH}.policy apmanager-seccomp.policy |
| } |
| |
| pkg_preinst() { |
| # Create user and group for apmanager. |
| enewuser "apmanager" |
| enewgroup "apmanager" |
| } |
| |
| platform_pkg_test() { |
| local tests=( |
| apmanager_testrunner |
| ) |
| |
| local test_bin |
| for test_bin in "${tests[@]}"; do |
| platform_test "run" "${OUT}/${test_bin}" |
| done |
| } |