From 8e208496124c2de02b9330c67b8cede328c69566 Mon Sep 17 00:00:00 2001 From: Lei YU Date: Thu, 29 Sep 2022 15:22:05 +0800 Subject: [PATCH] meson: Install all systemd units Previously the systemd units were not installed and it depends on the bitbake recipe (in meta-openembedded) to install the service only. Update the meson.build and install all the units. The bitbake recipe will need to be updated to add missing units to `SYSTEMD_SERVICE:${PN}`. Signed-off-by: Lei YU --- conf/meson.build | 18 ++++++++++++++++++ meson.build | 4 +++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 conf/meson.build diff --git a/conf/meson.build b/conf/meson.build new file mode 100644 index 0000000..14ae84b --- /dev/null +++ b/conf/meson.build @@ -0,0 +1,18 @@ +systemd = dependency('systemd') + +if systemd.found() + servicedir = systemd.get_variable('systemdsystemunitdir') + unit_files = [ + 'mctp-local.target', + 'mctp.target', + 'mctpd.service', + ] + + foreach unit : unit_files + configure_file(input: unit, + output: unit, + copy: true, + install_dir: servicedir) + endforeach +endif + diff --git a/meson.build b/meson.build index 7d605cb..0a0ed67 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ # project( 'mctp', 'c', - meson_version: '>= 0.47.0', + meson_version: '>= 0.58.0', version: 'v1.1', license: 'GPLv2', default_options: [ @@ -52,3 +52,5 @@ if libsystemd.found() install_dir: get_option('sbindir'), ) endif + +subdir('conf')