Skip to content

Commit b2ccdf2

Browse files
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 <[email protected]>
1 parent 985df80 commit b2ccdf2

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

conf/meson.build

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
systemd = dependency('systemd')
2+
3+
if systemd.found()
4+
servicedir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
5+
unit_files = [
6+
'mctp-local.target',
7+
'mctp.target',
8+
'mctpd.service',
9+
]
10+
11+
foreach unit : unit_files
12+
configure_file(input: unit,
13+
output: unit,
14+
copy: true,
15+
install_dir: servicedir)
16+
endforeach
17+
endif
18+

meson.build

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33
project(
44
'mctp', 'c',
5-
meson_version: '>= 0.47.0',
5+
meson_version: '>= 0.51.0',
66
version: 'v1.0',
77
license: 'GPLv2',
88
default_options: [
@@ -52,3 +52,5 @@ if libsystemd.found()
5252
install_dir: get_option('sbindir'),
5353
)
5454
endif
55+
56+
subdir('conf')

0 commit comments

Comments
 (0)