meta-facebook: tiogapass: powerctrl

The setup_gpio.sh, power service, and power-util are not applicable to
all platforms.  They will be moved to the tiogapass platform layer.
The setup_gpio.sh uses exported GPIO, which can impact the libgpio
function.

Change-Id: I7a95f8a5466f220d3c5fb8aadb2507d0f23ce857
Signed-off-by: Peter Yin <peter.yin@quantatw.com>
diff --git a/meta-facebook/meta-tiogapass/recipes-tiogapass/fb-powerctrl/fb-powerctrl_0.1.bb b/meta-facebook/meta-tiogapass/recipes-tiogapass/fb-powerctrl/fb-powerctrl_0.1.bb
new file mode 100644
index 0000000..21bd220
--- /dev/null
+++ b/meta-facebook/meta-tiogapass/recipes-tiogapass/fb-powerctrl/fb-powerctrl_0.1.bb
@@ -0,0 +1,28 @@
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit allarch systemd obmc-phosphor-systemd
+
+RDEPENDS:${PN} += "bash"
+
+SRC_URI += " \
+    file://setup_gpio.sh \
+    file://power-util \
+    file://host-gpio.service \
+    file://host-poweroff.service \
+    file://host-poweron.service \
+    "
+
+SYSTEMD_PACKAGES = "${PN}"
+SYSTEMD_SERVICE:${PN}:append = " \
+    host-gpio.service host-poweron.service \
+    host-poweroff.service \
+    "
+
+S = "${WORKDIR}"
+
+do_install() {
+    install -d ${D}/usr/sbin
+    install -m 0755 ${S}/setup_gpio.sh ${D}/${sbindir}/
+    install -m 0755 ${S}/power-util ${D}/${sbindir}/
+}