blob: 8f1b0c99cf0b954d8abcd5a2d80d11f34445eaec [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_PROJECT="chromiumos/platform/vpd"
CROS_WORKON_LOCALNAME="platform/vpd"
inherit cros-workon systemd
DESCRIPTION="ChromeOS vital product data utilities"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/vpd/"
SRC_URI=""
LICENSE="BSD-Google"
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_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 util/vpd_icc
# 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-icc.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
}