gmi: Add gmi-native to have files for build only
The principal.proto is being installed onto the gBMC right now, however,
we only need it in the native env for building other protos.
Google-Bug-Id: 306201616
Change-Id: I5e50e3275ba45bf16350d113bf13f89043d8d7e5
Signed-off-by: Willy Tu <wltu@google.com>
(cherry picked from commit 96b35318b8df64f8bbbc8ad80c5373c748ae3d86)
diff --git a/recipes-google/g3-shared-libs/gmi_git.bb b/recipes-google/g3-shared-libs/gmi_git.bb
index 216c043..69d750e 100644
--- a/recipes-google/g3-shared-libs/gmi_git.bb
+++ b/recipes-google/g3-shared-libs/gmi_git.bb
@@ -8,5 +8,21 @@
FILES:${PN} = " \
${libdir}/libgmi_protos${SOLIBS} \
${includedir}/gmi\* \
+"
+
+# Remove gmi/principal.proto from the image.
+do_install:append(){
+ rm -rf ${D}${datadir}/gmi
+ rm -rf ${D}${datadir}
+}
+
+# Install gmi/principal.proto in native for buliding only
+do_install:append:class-native(){
+ install -d ${D}${datadir}/gmi
+ install ${S}/gmi/principal.proto ${D}${datadir}/gmi
+}
+
+BBCLASSEXTEND = "native"
+FILES:${PN}-native = " \
${datadir}/gmi/principal.proto \
"