| # Copyright 2016 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_COMMIT="d640cf36c1cb7d5b90023f4fb26b476a41d26b6f" |
| CROS_WORKON_TREE=("5ce03b99f33d64f242f02a09dcf165bdbad8d7d4" "dbb4c5a189c098e0c692a1dee66f5a6b6ef33a32" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb") |
| CROS_WORKON_INCREMENTAL_BUILD="1" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| CROS_WORKON_SUBTREE="common-mk libcontainer .gn" |
| |
| PLATFORM_SUBDIR="libcontainer" |
| |
| inherit cros-workon platform user |
| |
| DESCRIPTION="Library to run jailed containers on Chrome OS" |
| HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/libcontainer/" |
| |
| LICENSE="BSD-Google" |
| KEYWORDS="*" |
| IUSE="+device-mapper" |
| |
| # Need lvm2 for devmapper. |
| RDEPEND="chromeos-base/minijail:= |
| device-mapper? ( sys-fs/lvm2:= )" |
| DEPEND="${RDEPEND}" |
| |
| src_install() { |
| into / |
| dolib.so "${OUT}"/lib/libcontainer.so |
| |
| "${S}"/platform2_preinstall.sh "${PV}" "/usr/include/chromeos" "${OUT}" |
| insinto "/usr/$(get_libdir)/pkgconfig" |
| doins "${OUT}"/libcontainer.pc |
| |
| insinto "/usr/include/chromeos" |
| doins libcontainer.h |
| } |
| |
| platform_pkg_test() { |
| platform_test "run" "${OUT}"/libcontainer_test |
| } |