Matt Spinler | 23f2883 | 2016-09-07 13:39:18 -0500 | [diff] [blame] | 1 | SUMMARY = "Phosphor Inventory Generation" |
| 2 | DESCRIPTION = "Generates inventory data from the machine readable workbook" |
| 3 | PR = "r1" |
| 4 | |
Matt Spinler | 3f6fcbe | 2017-12-14 13:31:55 -0600 | [diff] [blame] | 5 | inherit mrw-xml |
| 6 | |
Matt Spinler | 23f2883 | 2016-09-07 13:39:18 -0500 | [diff] [blame] | 7 | S = "${WORKDIR}/git" |
| 8 | |
Matt Spinler | 6f5fba1 | 2016-09-13 16:20:01 -0500 | [diff] [blame] | 9 | PROVIDES += "virtual/obmc-inventory-data" |
| 10 | RPROVIDES_${PN} += "virtual-obmc-inventory-data" |
Matt Spinler | 23f2883 | 2016-09-07 13:39:18 -0500 | [diff] [blame] | 11 | |
| 12 | inherit allarch |
| 13 | inherit obmc-phosphor-license |
Patrick Williams | d30c929 | 2016-10-31 15:45:17 -0500 | [diff] [blame] | 14 | inherit mrw-rev |
Matt Spinler | 23f2883 | 2016-09-07 13:39:18 -0500 | [diff] [blame] | 15 | |
| 16 | DEPENDS += "mrw-native mrw-api-native" |
| 17 | |
Patrick Williams | 4f02a45 | 2016-10-31 15:46:40 -0500 | [diff] [blame] | 18 | SRC_URI += "${MRW_TOOLS_SRC_URI}" |
| 19 | SRCREV = "${MRW_TOOLS_SRCREV}" |
Matt Spinler | 23f2883 | 2016-09-07 13:39:18 -0500 | [diff] [blame] | 20 | |
| 21 | FILES_${PN} += "${datadir}/inventory" |
| 22 | |
| 23 | do_compile() { |
| 24 | ${STAGING_BINDIR_NATIVE}/perl-native/perl ${S}/inventory.pl \ |
Matt Spinler | 3f6fcbe | 2017-12-14 13:31:55 -0600 | [diff] [blame] | 25 | -x ${STAGING_DIR_NATIVE}${mrw_datadir}/${MRW_XML} -o inventory.json |
Matt Spinler | 23f2883 | 2016-09-07 13:39:18 -0500 | [diff] [blame] | 26 | } |
| 27 | |
| 28 | do_install() { |
| 29 | install -d ${D}${datadir}/inventory |
| 30 | install -m 0644 inventory.json ${D}${datadir}/inventory/inventory.json |
| 31 | } |