Add recipe for openpower-vpd-parser

openpower-vpd-parser includes an application which reads OpenPOWER VPD
from an eeprom, parses it and writes the parsed content to the
inventory.

Change-Id: Id50d2c48e1f084777dd445753779426045c52428
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb
new file mode 100644
index 0000000..801b85d
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/vpd/openpower-fru-vpd.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Parser for OpenPOWER-format FRU VPD"
+DESCRIPTION = "Parse OpenPOWER-format FRU VPD and update inventory"
+PR = "r1"
+
+inherit autotools pkgconfig
+inherit openpower-fru-vpd
+inherit pythonnative
+inherit obmc-phosphor-systemd
+
+require ${PN}.inc
+
+DEPENDS += " \
+        virtual/openpower-fru-vpd-layout \
+        virtual/openpower-fru-inventory \
+        sdbusplus \
+        phosphor-logging \
+        python-mako-native \
+        python-pyyaml-native \
+        autoconf-archive-native \
+        "
+
+RDEPENDS_${PN} += " \
+               sdbusplus \
+               phosphor-logging \
+               "
+
+SYSTEMD_SERVICE_${PN} += "op-vpd-parser.service"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "FRU_YAML=${STAGING_DIR_NATIVE}${vpdlayout_datadir}/layout.yaml"
+
+do_install_append() {
+        SRC=${STAGING_DATADIR_NATIVE}${inventory_datadir_name}
+        DEST=${D}${inventory_envdir}
+        install -d ${DEST}
+        install ${SRC}/inventory ${DEST}
+}