| # Copyright 2012 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| CROS_WORKON_COMMIT="d506d206c44a7eaff78194369b6ca8474ae3ba41" |
| CROS_WORKON_TREE="d3bfb1b162e780017b12608dc91ef85edb117e59" |
| 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/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/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 |
| } |