blob: 71d1a25dfb898d3bcfa12b6fb246edcddcb956c7 [file] [log] [blame]
Matt Spinler23f28832016-09-07 13:39:18 -05001SUMMARY = "Phosphor Inventory Generation"
2DESCRIPTION = "Generates inventory data from the machine readable workbook"
3PR = "r1"
Patrick Venture77d14392018-10-30 17:17:07 -07004PV = "1.0+git${SRCPV}"
Matt Spinler23f28832016-09-07 13:39:18 -05005
Matt Spinler3f6fcbe2017-12-14 13:31:55 -06006inherit mrw-xml
7
Matt Spinler23f28832016-09-07 13:39:18 -05008S = "${WORKDIR}/git"
9
Matt Spinler6f5fba12016-09-13 16:20:01 -050010PROVIDES += "virtual/obmc-inventory-data"
11RPROVIDES_${PN} += "virtual-obmc-inventory-data"
Matt Spinler23f28832016-09-07 13:39:18 -050012
13inherit allarch
14inherit obmc-phosphor-license
Patrick Williamsd30c9292016-10-31 15:45:17 -050015inherit mrw-rev
Matt Spinler23f28832016-09-07 13:39:18 -050016
17DEPENDS += "mrw-native mrw-api-native"
18
Patrick Williams4f02a452016-10-31 15:46:40 -050019SRC_URI += "${MRW_TOOLS_SRC_URI}"
20SRCREV = "${MRW_TOOLS_SRCREV}"
Matt Spinler23f28832016-09-07 13:39:18 -050021
22FILES_${PN} += "${datadir}/inventory"
23
24do_compile() {
25 ${STAGING_BINDIR_NATIVE}/perl-native/perl ${S}/inventory.pl \
Matt Spinler3f6fcbe2017-12-14 13:31:55 -060026 -x ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} -o inventory.json
Matt Spinler23f28832016-09-07 13:39:18 -050027}
28
29do_install() {
30 install -d ${D}${datadir}/inventory
31 install -m 0644 inventory.json ${D}${datadir}/inventory/inventory.json
32}