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.

Change-Id: I919333909d59976743192e18b68b21c271e5e554
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb b/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
index dd6da47..93b6f56 100644
--- a/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
+++ b/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 \
     "