blob: 9d80fb8b14f7894d9808a6a44e6ff75a3f3f92e1 [file] [log] [blame]
# 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="195b5526d9c1c30b5a1ab993fbda530d1aa23d8d"
CROS_WORKON_TREE=("0295472676671915bab943e84d561ed834ea7622" "e0cea243aaf288ca5173c0d51b9bc62c3e3f09bd" "f151afc2e5241eeb2ae52d3c83d124e1f0dcc836")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
# TODO(crbug.com/809389): Avoid directly including headers from other packages.
CROS_WORKON_SUBTREE="common-mk authpolicy metrics"
PLATFORM_SUBDIR="authpolicy"
inherit cros-workon platform user
DESCRIPTION="Provides authentication to LDAP and fetching device/user policies"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE="+samba"
RDEPEND="
app-crypt/mit-krb5
chromeos-base/libbrillo
chromeos-base/metrics
>=chromeos-base/minijail-0.0.1-r1477
dev-libs/protobuf
dev-libs/dbus-glib
samba? ( >=net-fs/samba-4.5.3-r6 )
sys-apps/dbus
sys-libs/libcap
"
DEPEND="
${RDEPEND}
chromeos-base/protofiles:=
chromeos-base/system_api
"
pkg_preinst() {
# Create user and group for authpolicyd and authpolicyd-exec.
enewuser "authpolicyd"
enewgroup "authpolicyd"
enewuser "authpolicyd-exec"
enewgroup "authpolicyd-exec"
}
src_install() {
dosbin "${OUT}"/authpolicyd
dosbin "${OUT}"/authpolicy_parser
insinto /etc/dbus-1/system.d
doins etc/dbus-1/org.chromium.AuthPolicy.conf
insinto /etc/init
doins etc/init/authpolicyd.conf
insinto /usr/share/policy
doins seccomp_filters/*.policy
}
platform_pkg_test() {
local tests=(
authpolicy_test
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}"
done
}