Add recipe files to Auto generate led manager configuration files

Change-Id: Idb60e5fa12ef6114eccabada85920aae2f0a3a1b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
new file mode 100644
index 0000000..3a28a24
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/leds/phosphor-led-manager-config-mrw-native.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Phosphor LED Group Management with MRW generated data"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-utils
+inherit obmc-phosphor-license
+
+DEPENDS += "mrw-native mrw-perl-tools-native"
+
+# Generate a YAML files based on MRW input
+do_install_append() {
+    USE_MRW="${@cf_enabled('obmc-mrw', 'yes', d)}"
+    DEST=${STAGING_DATADIR_NATIVE}/phosphor-led-manager
+
+    if [ "${USE_MRW}" = "yes" ]; then
+        install -d ${DEST}/
+        ${STAGING_BINDIR_NATIVE}/perl-native/perl \
+        ${STAGING_BINDIR_NATIVE}/gen_led_groups.pl \
+        -i ${STAGING_DATADIR_NATIVE}/obmc-mrw/${MACHINE}.xml \
+        -o ${DEST}/led.yaml
+    fi
+}