mctp: Add MCTP package recipe

This change adds a recipe for the libmctp sources, which provide a
library implementing the MCTP base protocol, plus a demulitplexer daemon
to provide a socket-based interface for client applications.

This is covered in the mctp design document:

  https://github.com/openbmc/docs/blob/master/designs/mctp.md

Change-Id: I892e420e50cb8eacbdd27779db3d0edcefbf0fbb
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
diff --git a/recipes-phosphor/mctp/files/default b/recipes-phosphor/mctp/files/default
new file mode 100644
index 0000000..cb33e8b
--- /dev/null
+++ b/recipes-phosphor/mctp/files/default
@@ -0,0 +1 @@
+DEMUX_BINDING_OPTS=null
diff --git a/recipes-phosphor/mctp/mctp_git.bb b/recipes-phosphor/mctp/mctp_git.bb
new file mode 100644
index 0000000..a2577cf
--- /dev/null
+++ b/recipes-phosphor/mctp/mctp_git.bb
@@ -0,0 +1,28 @@
+SUMMARY = "MCTP stack"
+DESCRIPTION = "MCTP library implementing the MCTP base specification"
+PR = "r1"
+PV = "1.0+git${SRCPV}"
+
+inherit systemd
+inherit autotools pkgconfig
+
+HOMEPAGE = "https://github.com/openbmc/libmctp"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=0d30807bb7a4f16d36e96b78f9ed8fae"
+SRC_URI = "git://github.com/openbmc/libmctp \
+	   file://default"
+SRCREV = "34b9b3d82b049610775aea4460ff0f3bb9f02b1d"
+CONFFILES_${PN} = "${sysconfdir}/default/mctp"
+
+DEPENDS += "autoconf-archive-native \
+            systemd \
+            "
+
+SYSTEMD_SERVICE_${PN} = "mctp-demux.service"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/default
+	install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/mctp
+}
+
+S = "${WORKDIR}/git"