move service files from Yocto layer

This change relocates phosphor-led-manager service files from the Yocto
layer to the phosphor-led-manager repository.
It also ensures that non-user executables are installed in the libexec.

[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#incorrect-placement-of-executables-in-sbin-usrsbin-or-bin-usrbin

Tested:
```
$ find /tmp/phosphor-led-manager/ | grep libexec
/tmp/phosphor-led-manager/usr/local/libexec
/tmp/phosphor-led-manager/usr/local/libexec/phosphor-led-manager
/tmp/phosphor-led-manager/usr/local/libexec/phosphor-led-manager/phosphor-ledmanager
/tmp/phosphor-led-manager/usr/local/libexec/phosphor-led-manager/phosphor-fru-fault-monitor
$ find /tmp/phosphor-led-manager -type f | grep service
/tmp/phosphor-led-manager/usr/lib/systemd/system/obmc-fru-fault-monitor.service
/tmp/phosphor-led-manager/usr/lib/systemd/system/obmc-led-group-start@.service
/tmp/phosphor-led-manager/usr/lib/systemd/system/obmc-led-group-stop@.service
/tmp/phosphor-led-manager/usr/lib/systemd/system/xyz.openbmc_project.LED.GroupManager.service
```

Change-Id: Id34402c5d4ec40a6bb72f0a349c6dfb5ed1929e2
Signed-off-by: William de Abreu Pinho <williamdapinho@gmail.com>
diff --git a/fault-monitor/meson.build b/fault-monitor/meson.build
index 6765b7b..6420f3d 100644
--- a/fault-monitor/meson.build
+++ b/fault-monitor/meson.build
@@ -12,5 +12,5 @@
     include_directories: ['.', '../'],
     dependencies: deps,
     install: true,
-    install_dir: get_option('bindir'),
+    install_dir: get_option('libexecdir') / 'phosphor-led-manager',
 )
diff --git a/manager/meson.build b/manager/meson.build
index ce4dbed..e51d6b2 100644
--- a/manager/meson.build
+++ b/manager/meson.build
@@ -47,5 +47,5 @@
     include_directories: ['..'],
     dependencies: deps,
     install: true,
-    install_dir: get_option('bindir'),
+    install_dir: get_option('libexecdir') / 'phosphor-led-manager',
 )
diff --git a/meson.build b/meson.build
index ed71cc6..9643ade 100644
--- a/meson.build
+++ b/meson.build
@@ -85,6 +85,7 @@
 
 subdir('manager')
 subdir('fault-monitor')
+subdir('service_files')
 
 configure_file(output: 'config.h', configuration: conf_data)
 
diff --git a/service_files/meson.build b/service_files/meson.build
new file mode 100644
index 0000000..adc214e
--- /dev/null
+++ b/service_files/meson.build
@@ -0,0 +1,13 @@
+systemd = dependency('systemd')
+systemd_system_unit_dir = systemd.get_variable(
+    pkgconfig: 'systemd_system_unit_dir',
+)
+
+foreach svc : [
+    'obmc-fru-fault-monitor.service',
+    'obmc-led-group-start@.service',
+    'obmc-led-group-stop@.service',
+    'xyz.openbmc_project.LED.GroupManager.service',
+]
+    install_data(svc, install_dir: systemd_system_unit_dir)
+endforeach
diff --git a/service_files/obmc-fru-fault-monitor.service b/service_files/obmc-fru-fault-monitor.service
new file mode 100644
index 0000000..683de9a
--- /dev/null
+++ b/service_files/obmc-fru-fault-monitor.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=FRU Fault monitor service
+Wants=mapper-wait@-xyz-openbmc_project-led-groups.service
+After=mapper-wait@-xyz-openbmc_project-led-groups.service
+
+[Service]
+Restart=always
+ExecStart=usr/libexec/phosphor-led-manager/phosphor-fru-fault-monitor
+SyslogIdentifier=phosphor-fru-fault-monitor
+
+[Install]
+WantedBy=multi-user.target
diff --git a/service_files/obmc-led-group-start@.service b/service_files/obmc-led-group-start@.service
new file mode 100644
index 0000000..30ddbfd
--- /dev/null
+++ b/service_files/obmc-led-group-start@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Assert %i LED
+Wants=xyz.openbmc_project.LED.GroupManager.service
+After=xyz.openbmc_project.LED.GroupManager.service
+Conflicts=obmc-led-group-stop@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart=/bin/sh -c "busctl call xyz.openbmc_project.LED.GroupManager /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b true"
+SyslogIdentifier=obmc-led-group-start
diff --git a/service_files/obmc-led-group-stop@.service b/service_files/obmc-led-group-stop@.service
new file mode 100644
index 0000000..7608e50
--- /dev/null
+++ b/service_files/obmc-led-group-stop@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Deassert %i LED
+Wants=xyz.openbmc_project.LED.GroupManager.service
+After=xyz.openbmc_project.LED.GroupManager.service
+Conflicts=obmc-led-group-start@%i.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+Restart=no
+ExecStart=/bin/sh -c "busctl call xyz.openbmc_project.LED.GroupManager /xyz/openbmc_project/led/groups/%i org.freedesktop.DBus.Properties Set ssv xyz.openbmc_project.Led.Group Asserted b false"
+SyslogIdentifier=obmc-led-group-stop
diff --git a/service_files/xyz.openbmc_project.LED.GroupManager.service b/service_files/xyz.openbmc_project.LED.GroupManager.service
new file mode 100644
index 0000000..ef8c3f2
--- /dev/null
+++ b/service_files/xyz.openbmc_project.LED.GroupManager.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phosphor LED Group Management Daemon
+Before=mapper-wait@-xyz-openbmc_project-led-groups.service
+After=phosphor-ledcontroller.service
+
+[Service]
+Restart=always
+ExecStart=/usr/libexec/phosphor-led-manager/phosphor-ledmanager
+SyslogIdentifier=phosphor-ledmanager
+Type=dbus
+BusName=xyz.openbmc_project.LED.GroupManager
+
+[Install]
+WantedBy=multi-user.target