Initial recipe for phosphor-host-state-manager

Delivers the phosphor-host-state-manager application
which provides control and query functions on the
host objects in the system

Change-Id: I8bb91b44873edf3e9836d16a19bce1d2748c9f51
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/common/recipes-phosphor/state/phosphor-host-state-manager.bb b/common/recipes-phosphor/state/phosphor-host-state-manager.bb
new file mode 100644
index 0000000..cde6004
--- /dev/null
+++ b/common/recipes-phosphor/state/phosphor-host-state-manager.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Phosphor Host State Management"
+DESCRIPTION = "Phosphor Host State Manager provides a host state \
+object which manages the hosts in the system. It is suitable for use on \
+a wide variety of OpenBMC platforms."
+HOMEPAGE = "https://github.com/openbmc/phosphor-state-manager"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+inherit autotools pkgconfig
+inherit obmc-phosphor-dbus-service
+
+DBUS_SERVICE_${PN} += "xyz.openbmc_project.State.Host.service"
+
+RDEPENDS_${PN} += "libsystemd"
+DEPENDS += "autoconf-archive-native"
+DEPENDS += "sdbusplus"
+DEPENDS += "phosphor-logging"
+
+PROVIDES += "virtual/obmc-host-state-mgmt"
+RPROVIDES_${PN} += "virtual-obmc-host-state-mgmt"
+
+SRC_URI += "git://github.com/openbmc/phosphor-state-manager"
+SRCREV = "794baed325213d39d75e5f8c3374177891ef70ec"
+
+S = "${WORKDIR}/git"
diff --git a/common/recipes-phosphor/state/phosphor-host-state-manager/xyz.openbmc_project.State.Host.service b/common/recipes-phosphor/state/phosphor-host-state-manager/xyz.openbmc_project.State.Host.service
new file mode 100644
index 0000000..8fd2ed3
--- /dev/null
+++ b/common/recipes-phosphor/state/phosphor-host-state-manager/xyz.openbmc_project.State.Host.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phosphor Host State Manager
+Wants=mapper-wait@-org-openbmc-managers-System.service
+After=mapper-wait@-org-openbmc-managers-System.service
+Before=mapper-wait@-xyz-openbmc_project-state-host.service
+
+[Service]
+ExecStart={sbindir}/phosphor-host-state-manager
+Restart=always
+Type=dbus
+BusName={BUSNAME}
+
+[Install]
+WantedBy={SYSTEMD_DEFAULT_TARGET}