blob: 24f7227524c5efaccbf14e5285a3950b632e1daa [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="4"
CROS_WORKON_COMMIT="4649d42d10a7fa32f18da7e77e019891d1d7d940"
CROS_WORKON_TREE="3a9ead2c020d82aa97b5424a4255490cc1fc6dbd"
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"
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
}