Add attention handler systemd unit file

Moved attn_handler.service file out of recipe and into
local repository and installing it via local meson.build.

Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: Ib2f2d03ce683d65d1211777d1c162d86f9cd0ad3
diff --git a/attn/attn_handler.service b/attn/attn_handler.service
new file mode 100644
index 0000000..42bbf34
--- /dev/null
+++ b/attn/attn_handler.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=The Attention Handler service
+Wants=obmc-mapper.target
+After=obmc-mapper.target
+After=mapper-wait@-xyz-openbmc_project-logging.service
+
+[Service]
+ExecStart=/usr/bin/attn_handler
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/attn/meson.build b/attn/meson.build
index 5419c7a..c715dce 100644
--- a/attn/meson.build
+++ b/attn/meson.build
@@ -19,6 +19,15 @@
 whole_archive = declare_dependency(link_args : '-Wl,--whole-archive')
 no_whole_archive = declare_dependency(link_args : '-Wl,--no-whole-archive')
 
+# install systemd unit file
+configure_file(
+    input: 'attn_handler.service',
+    output: 'attn_handler.service',
+    copy: true,
+    install_dir:
+        dependency('systemd').get_pkgconfig_variable(
+            'systemdsystemunitdir')
+)
 executable('attn_handler',
            'attn_main.cpp', 'attn_handler.cpp', 'attn_monitor.cpp',
            dependencies : [whole_archive, libpdbg,