blob: f6fff16e5b5ad7d5e1eaf4f7fba24e8bbbea9418 [file] [log] [blame]
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=4
CROS_WORKON_COMMIT="d03de8e4b1ab3eab2bfbb924342b02f176b50b08"
CROS_WORKON_TREE="281c4e1d191b9075aafb7447fb29d80bc74e6d87"
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
PLATFORM_SUBDIR="peerd"
inherit cros-workon platform user
DESCRIPTION="Local peer discovery services for Chromium OS"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD-Google"
SLOT=0
KEYWORDS="*"
RDEPEND="
chromeos-base/libbrillo
net-dns/avahi-daemon
"
DEPEND="${RDEPEND}"
pkg_preinst() {
# Create user and group for peerd.
enewuser "peerd"
enewgroup "peerd"
}
src_install() {
dobin "${OUT}/peerd"
# Install init scripts.
insinto /etc/init
doins init/peerd.conf
# Install DBus configuration files.
insinto /etc/dbus-1/system.d
doins dbus/org.chromium.peerd.conf
# Install DBus client library.
platform_install_dbus_client_lib
}
platform_pkg_test() {
local tests=(
peerd_testrunner
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}"
done
}