Merge pull request #40 from bradbishop/rest
rest/mapper recipes
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper.bb b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper.bb
new file mode 100644
index 0000000..67219b0
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Phosphor DBUS Object Manager"
+DESCRIPTION = "Phosphor DBUS object manager."
+HOMEPAGE = "http://github.com/openbmc/phosphor-objmgr"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit allarch
+inherit obmc-phosphor-dbus-service
+inherit obmc-phosphor-systemd
+inherit setuptools
+
+DBUS_SERVICES += "org.openbmc.ObjectMapper"
+RDEPENDS_${PN} += " \
+ python-xml \
+ python-dbus \
+ python-pygobject \
+ "
+SRC_URI += " \
+ git://github.com/openbmc/phosphor-objmgr \
+ "
+
+SRCREV = "e290f5cdccf14e50e838366367c91e0464f792f6"
+
+S = "${WORKDIR}/git"
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
new file mode 100644
index 0000000..773eaa5
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/obmc-mapper.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Phosphor OpenBMC DBus service management daemon
+
+[Service]
+Type=dbus
+ExecStart=/usr/sbin/phosphor-mapper
+BusName=org.openbmc.objectmapper
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/org.openbmc.ObjectMapper.conf b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/org.openbmc.ObjectMapper.conf
new file mode 100644
index 0000000..9a26ab9
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-mapper/org.openbmc.ObjectMapper.conf
@@ -0,0 +1,8 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <policy user="root">
+ <allow own="org.openbmc.ObjectMapper"/>
+ <allow send_destination="org.openbmc.ObjectMapper"/>
+ </policy>
+</busconfig>
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest.bb b/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest.bb
new file mode 100644
index 0000000..0162ec5
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Phosphor DBUS REST Server"
+DESCRIPTION = "Phosphor DBUS REST manager."
+HOMEPAGE = "http://github.com/openbmc/phosphor-rest-server"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
+
+inherit allarch
+inherit obmc-phosphor-systemd
+inherit setuptools
+
+RDEPENDS_${PN} += " \
+ python-xml \
+ python-dbus \
+ python-pygobject \
+ obmc-mapper \
+ "
+SRC_URI += " \
+ git://github.com/openbmc/phosphor-rest-server \
+ "
+
+SRCREV = "2f7aef50b005c16a51065984f090e787c04c0c14"
+
+S = "${WORKDIR}/git"
diff --git a/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service b/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
new file mode 100644
index 0000000..eb1c47e
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/dbus/obmc-rest/obmc-rest.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Phosphor OpenBMC DBus REST daemon
+Requires=obmc-mapper.service
+After=obmc-mapper.service
+
+[Service]
+ExecStart=/usr/sbin/phosphor-rest
+
+[Install]
+WantedBy=multi-user.target
diff --git a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb
index 4dbcdd3..cac7b1b 100644
--- a/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb
+++ b/meta-phosphor/common/recipes-phosphor/packagegroups/packagegroup-obmc-phosphor-apps.bb
@@ -25,6 +25,7 @@
SUMMARY_packagegroup-obmc-phosphor-apps-extras = "Extra features"
RDEPENDS_packagegroup-obmc-phosphor-apps-extras = " \
rest-dbus \
+ obmc-rest \
host-ipmid \
"