Add button signals and handler packages

The phosphor-buttons repo contains 2 apps - the button signal
sender, and the button signal handler, each with their own
service files.  Make those into packages, so if someone wants to
make their own button handler for example, they can just not include
the obmc-phosphor-buttons-handler package in their image.

Tested:  Built into a witherspoon image and installed on a system
         and saw everything running and working.

(From meta-phosphor rev: f69dd65883d8e9a1cf47e9ffcdd99efd75f6b630)

Change-Id: I9b81692ab57bbea0ad32751c036d46a33fe35c03
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
index dd6da47..93b6f56 100644
--- a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
+++ b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
@@ -11,13 +11,25 @@
 
 inherit cmake pkgconfig systemd
 
-SYSTEMD_SERVICE_${PN} += "xyz.openbmc_project.Chassis.Buttons.service"
+BUTTON_PACKAGES="${PN}-signals ${PN}-handler"
+
+ALLOW_EMPTY_${PN} = "1"
+PACKAGE_BEFORE_PN += "${BUTTON_PACKAGES}"
+PACKAGECONFIG ??= "signals handler"
+SYSTEMD_PACKAGES = "${BUTTON_PACKAGES}"
+
+PACKAGECONFIG[signals] = ",,gpioplus nlohmann-json,"
+PACKAGECONFIG[handler] = ",,,phosphor-state-manager-chassis phosphor-state-manager-host"
+
+FILES_${PN}-signals = "${sbindir}/buttons"
+SYSTEMD_SERVICE_${PN}-signals = "xyz.openbmc_project.Chassis.Buttons.service"
+
+FILES_${PN}-handler = "${sbindir}/button-handler"
+SYSTEMD_SERVICE_${PN}-handler = "phosphor-button-handler.service"
 
 DEPENDS += " \
     systemd \
     sdbusplus \
     phosphor-dbus-interfaces \
     phosphor-logging \
-    nlohmann-json \
-    gpioplus \
     "