| # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=4 |
| |
| CROS_WORKON_INCREMENTAL_BUILD=1 |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_OUTOFTREE_BUILD=1 |
| |
| PLATFORM_SUBDIR="login_manager" |
| |
| inherit cros-workon platform |
| |
| DESCRIPTION="Login manager for Chromium OS." |
| HOMEPAGE="http://www.chromium.org/" |
| SRC_URI="" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="~*" |
| IUSE="test" |
| |
| RDEPEND="chromeos-base/bootstat |
| chromeos-base/chromeos-minijail |
| chromeos-base/cryptohome |
| chromeos-base/libchromeos |
| chromeos-base/libchromeos-ui |
| chromeos-base/metrics |
| dev-libs/nss |
| dev-libs/protobuf |
| sys-apps/util-linux" |
| |
| DEPEND="${RDEPEND} |
| chromeos-base/protofiles |
| chromeos-base/system_api |
| chromeos-base/vboot_reference |
| sys-libs/glibc |
| test? ( dev-cpp/gmock ) |
| dev-cpp/gtest" |
| |
| src_compile() { |
| platform_src_compile |
| |
| # Build locale-archive for Chrome. This is a temporary workaround for |
| # crbug.com/116999. |
| # TODO(yusukes): Fix Chrome and remove the file. |
| mkdir -p "${T}/usr/lib64/locale" |
| localedef --prefix="${T}" -c -f UTF-8 -i en_US en_US.UTF-8 || die |
| } |
| |
| platform_pkg_test() { |
| local tests=( session_manager_test ) |
| |
| # Qemu doesn't support signalfd currently, and it's not clear how |
| # feasible it is to implement :(. |
| # So, filter out the tests that rely on signalfd(). |
| local gtest_qemu_filter="" |
| if ! use x86 && ! use amd64; then |
| gtest_qemu_filter+="-ChildExitHandlerTest.*" |
| gtest_qemu_filter+=":SessionManagerProcessTest.*" |
| fi |
| |
| |
| |
| local test_bin |
| for test_bin in "${tests[@]}"; do |
| platform_test "run" "${OUT}/${test_bin}" "0" "" "${gtest_qemu_filter}" |
| done |
| } |
| |
| src_install() { |
| into / |
| dosbin "${OUT}/keygen" |
| dosbin "${OUT}/session_manager" |
| |
| # Install DBus configuration. |
| insinto /usr/share/dbus-1/interfaces |
| doins dbus_bindings/org.chromium.SessionManagerInterface.xml |
| |
| insinto /etc/dbus-1/system.d |
| doins SessionManager.conf |
| |
| # Adding init scripts |
| insinto /etc/init |
| doins init/*.conf |
| |
| # TODO(yusukes): Fix Chrome and remove the file. See my comment above. |
| insinto /usr/$(get_libdir)/locale |
| doins "${T}/usr/lib64/locale/locale-archive" |
| |
| # For user session processes. |
| dodir /etc/skel/log |
| |
| # For user NSS database |
| diropts -m0700 |
| # Need to dodir each directory in order to get the opts right. |
| dodir /etc/skel/.pki |
| dodir /etc/skel/.pki/nssdb |
| # Yes, the created (empty) DB does work on ARM, x86 and x86_64. |
| certutil -N -d "sql:${D}/etc/skel/.pki/nssdb" -f <(echo '') || die |
| |
| insinto /etc |
| doins chrome_dev.conf |
| } |