blob: db3a5b404c73df050ade2723aa5dc04c81182d92 [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"
4
Matt Spinler3f6fcbe2017-12-14 13:31:55 -06005inherit mrw-xml
6
Matt Spinler23f28832016-09-07 13:39:18 -05007S = "${WORKDIR}/git"
8
Matt Spinler6f5fba12016-09-13 16:20:01 -05009PROVIDES += "virtual/obmc-inventory-data"
10RPROVIDES_${PN} += "virtual-obmc-inventory-data"
Matt Spinler23f28832016-09-07 13:39:18 -050011
12inherit allarch
13inherit obmc-phosphor-license
Patrick Williamsd30c9292016-10-31 15:45:17 -050014inherit mrw-rev
Matt Spinler23f28832016-09-07 13:39:18 -050015
16DEPENDS += "mrw-native mrw-api-native"
17
Patrick Williams4f02a452016-10-31 15:46:40 -050018SRC_URI += "${MRW_TOOLS_SRC_URI}"
19SRCREV = "${MRW_TOOLS_SRCREV}"
Matt Spinler23f28832016-09-07 13:39:18 -050020
21FILES_${PN} += "${datadir}/inventory"
22
23do_compile() {
24 ${STAGING_BINDIR_NATIVE}/perl-native/perl ${S}/inventory.pl \
Matt Spinler3f6fcbe2017-12-14 13:31:55 -060025 -x ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} -o inventory.json
Matt Spinler23f28832016-09-07 13:39:18 -050026}
27
28do_install() {
29 install -d ${D}${datadir}/inventory
30 install -m 0644 inventory.json ${D}${datadir}/inventory/inventory.json
31}