host-gpio-monitor: Use systemd template

The systemd target gbmc-bare-metal-active.target is being changed to a
template, in order to support multi-host systems. The commit updates the
host-gpio-monitor functionality accordingly. The host number now gets
passed in as an argument.

Tested:
Set the bare metal flag /var/google/config-package/enable-bm.flag on the
BMC. Started host-gpio-monitor@0.service, which then started
gbmc-bare-metal-active@0.target. Then rebooted the host, at which point,
the host-gpio-monitor@0.service disabled
gbmc-bare-metal-active@0.target.

Change-Id: I02a0b11996aa2ee168e682fbf61f3f1a8cf01771
Signed-off-by: John Wedig <johnwedig@google.com>
diff --git a/subprojects/bare-metal-host-monitor/meson.build b/subprojects/bare-metal-host-monitor/meson.build
index dfed5eb..d2b07e0 100644
--- a/subprojects/bare-metal-host-monitor/meson.build
+++ b/subprojects/bare-metal-host-monitor/meson.build
@@ -10,6 +10,16 @@
   ],
 )
 
+absls = [
+  'flags',
+  'flags_internal',
+  'flags_parse',
+]
+libabsl_deps = []
+foreach absl : absls
+  libabsl_deps += dependency('absl_' + absl)
+endforeach
+
 executable(
   'host_gpio_monitor',
   'host_gpio_monitor.cpp',
@@ -18,6 +28,7 @@
   [
     dependency('stdplus'),
     dependency('phosphor-logging'),
+    libabsl_deps,
   ],
   install: true,
   install_dir: get_option('libexecdir'),
@@ -30,7 +41,7 @@
 
 configure_file(
   configuration: {'BIN': libexecdir / 'host_gpio_monitor'},
-  input: 'host-gpio-monitor.service.in',
-  output: 'host-gpio-monitor.service',
+  input: 'host-gpio-monitor@.service.in',
+  output: 'host-gpio-monitor@.service',
   install_mode: 'rw-r--r--',
   install_dir: systemunitdir)