| # Copyright 2016 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=5 |
| |
| CROS_WORKON_COMMIT="a070c074a4f16a3de9b44199435512c9bc458a59" |
| CROS_WORKON_TREE=("a9c9dfedee8947f546a02e996ac05ea263acfaa1" "2a2bc80bdebc9f781e4b31c05241bf97d9b55a07" "ba35dec12a37eeafe435ecb6780035ce70500a75" "dc1506ef7c8cfd2c5ffd1809dac05596ec18773c") |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| # TODO(garrick): Workaround for https://crbug.com/809389 |
| CROS_WORKON_SUBTREE="common-mk arc/network shill/net .gn" |
| |
| PLATFORM_SUBDIR="arc/network" |
| PLATFORM_GYP_FILE="arc-network.gyp" |
| |
| inherit cros-workon libchrome platform user |
| |
| DESCRIPTION="ARC connectivity management daemon" |
| HOMEPAGE="http://www.chromium.org/" |
| LICENSE="BSD-Google" |
| SLOT=0 |
| KEYWORDS="*" |
| |
| COMMON_DEPEND=" |
| chromeos-base/libbrillo |
| dev-libs/protobuf:= |
| net-libs/libndp |
| " |
| |
| RDEPEND=" |
| ${COMMON_DEPEND} |
| chromeos-base/chromeos-nat-init |
| net-misc/bridge-utils |
| " |
| |
| DEPEND=" |
| ${COMMON_DEPEND} |
| chromeos-base/shill |
| chromeos-base/shill-client |
| chromeos-base/system_api |
| " |
| |
| src_install() { |
| # Main binary. |
| dobin "${OUT}"/arc-networkd |
| |
| # Utility library. |
| dolib.so "${OUT}"/lib/libarcnetwork-util.so |
| |
| "${S}"/preinstall.sh "${PV}" "/usr/include/chromeos" "${OUT}" |
| insinto "/usr/$(get_libdir)/pkgconfig" |
| doins "${OUT}"/libarcnetwork-util.pc |
| |
| insinto /usr/include/arc/network/ |
| doins mac_address_generator.h |
| doins subnet.h |
| doins subnet_pool.h |
| |
| insinto /etc/init |
| doins "${S}"/init/arc-network.conf |
| doins "${S}"/init/arc-network-bridge.conf |
| } |
| |
| pkg_preinst() { |
| # Service account used for privilege separation. |
| enewuser arc-networkd |
| enewgroup arc-networkd |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}/arc_network_testrunner" |
| } |
| |