meta-gbmc-staging: Add new recipe for RDEd

Tested: Manually
Google-Bug-Id: 503001726
Change-Id: I91a80f173e0d860f767bc0987089b35427ca8426
Signed-off-by: Muhammad Usama <muhammadusama@google.com>
diff --git a/recipes-google/rde-support/rde-support_git.bb b/recipes-google/rde-support/rde-support_git.bb
new file mode 100644
index 0000000..7910514
--- /dev/null
+++ b/recipes-google/rde-support/rde-support_git.bb
@@ -0,0 +1,47 @@
+SUMMARY = "RDE Stack"
+DESCRIPTION = "Implementation of RDE support over PLDM/MCTP"
+PR = "r1"
+PV = "0.1+git${SRCPV}"
+
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+inherit meson pkgconfig systemd
+
+S = "${WORKDIR}/git"
+SRC_URI = "git://gbmc.googlesource.com/pldm;protocol=https;branch=rde-support"
+SRCREV = "df7aad8aafe0d058fa35b5eed288faed725c8090"
+
+DEPENDS += " \
+  boost \
+  cli11 \
+  libpldm \
+  nlohmann-json \
+  phosphor-dbus-interfaces \
+  phosphor-logging \
+  stdplus \
+  systemd \
+  libbej \
+"
+
+PACKAGECONFIG[transport-af-mctp] = "-Dtransport-implementation=af-mctp"
+PACKAGECONFIG ??= " transport-af-mctp"
+
+EXTRA_OEMESON += " \
+    -Dtests=disabled \
+    -Dsoftoff=disabled \
+    -Doem-ibm=disabled \
+    -Dutilities=disabled \
+    -Dlibpldm:oem=[] \
+    -Drde_expand_feature=enabled \
+"
+
+SYSTEMD_SERVICE:${PN} += "rded.service rde_fan_sensor.service"
+
+do_install:append() {
+    rm -f ${D}${systemd_system_unitdir}/pldmd.service
+    rm -rf ${D}${datadir}/pldm
+    # Remove /usr/share only if it is empty
+    rmdir ${D}${datadir} || true
+}
+