| # 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_COMMIT="086e3f762f98ea04586041a9dcc0d9ca077f1615" |
| CROS_WORKON_TREE="0ece40a78b9fd856de9c782b7165719eddb888b1" |
| CROS_WORKON_PROJECT="chromiumos/platform/vpd" |
| |
| inherit cros-workon systemd |
| |
| DESCRIPTION="ChromeOS vital product data utilities" |
| HOMEPAGE="http://www.chromium.org/" |
| SRC_URI="" |
| |
| LICENSE="BSD-Google" |
| SLOT="0" |
| KEYWORDS="*" |
| IUSE="static systemd" |
| |
| # util-linux is for libuuid. |
| DEPEND="sys-apps/util-linux" |
| # shflags for dump_vpd_log. |
| # chromeos-activate-date for ActivateDate upstart and script. |
| RDEPEND=" |
| sys-apps/flashrom |
| dev-util/shflags |
| virtual/chromeos-activate-date |
| " |
| |
| src_configure() { |
| cros-workon_src_configure |
| } |
| |
| src_compile() { |
| tc-export CC |
| use static && append-ldflags -static |
| emake all |
| } |
| |
| src_install() { |
| # This target list should be architecture specific |
| # (no ACPI stuff on ARM for instance) |
| dosbin vpd vpd_s |
| dosbin util/check_rw_vpd util/dump_vpd_log util/update_rw_vpd |
| dosbin util/vpd_get_value |
| |
| # install the init script |
| if use systemd; then |
| systemd_dounit init/vpd-log.service |
| systemd_enable_service boot-services.target vpd-log.service |
| else |
| insinto /etc/init |
| doins init/check-rw-vpd.conf |
| doins init/vpd-log.conf |
| fi |
| } |
| |
| src_test() { |
| if ! use x86 && ! use amd64; then |
| ewarn "Skipping unittests for non-x86 arches" |
| return |
| fi |
| emake test |
| } |