1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

meson: move declarations of machined and friends

This commit is contained in:
Yu Watanabe 2023-06-25 16:05:38 +09:00
parent ec88da9146
commit 19361deaea
3 changed files with 102 additions and 116 deletions

View File

@ -2581,104 +2581,6 @@ meson.add_install_script(meson_make_symlink,
bindir / 'udevadm',
libexecdir / 'systemd-udevd')
if conf.get('ENABLE_MACHINED') == 1
dbus_programs += executable(
'systemd-machined',
systemd_machined_sources,
include_directories : includes,
link_with : [libmachine_core,
libshared],
dependencies : userspace,
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += executable(
'machinectl',
'src/machine/machinectl.c',
include_directories : includes,
link_with : [libshared],
dependencies : [liblz4,
libxz,
libzstd,
threads,
userspace],
install_rpath : pkglibdir,
install : true)
endif
if conf.get('ENABLE_IMPORTD') == 1
dbus_programs += executable(
'systemd-importd',
systemd_importd_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [threads,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_pull = executable(
'systemd-pull',
systemd_pull_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [lib_openssl_or_gcrypt,
libbzip2,
libcurl,
libxz,
libz,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_import = executable(
'systemd-import',
systemd_import_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [libbzip2,
libcurl,
libxz,
libz,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_import_fs = executable(
'systemd-import-fs',
systemd_import_fs_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
systemd_export = executable(
'systemd-export',
systemd_export_sources,
include_directories : includes,
link_with : [libshared,
lib_import_common],
dependencies : [libbzip2,
libcurl,
libxz,
libz,
userspace],
install_rpath : pkglibdir,
install : true,
install_dir : libexecdir)
public_programs += [systemd_pull, systemd_import, systemd_import_fs, systemd_export]
endif
if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_LIBCURL') == 1
public_programs += executable(
'systemd-journal-upload',

View File

@ -1,7 +1,8 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_importd_sources = files(
'importd.c')
'importd.c',
)
systemd_pull_sources = files(
'pull.c',
@ -19,7 +20,8 @@ systemd_import_sources = files(
)
systemd_import_fs_sources = files(
'import-fs.c')
'import-fs.c',
)
systemd_export_sources = files(
'export.c',
@ -27,19 +29,80 @@ systemd_export_sources = files(
'export-raw.c',
)
if conf.get('ENABLE_IMPORTD') == 1
lib_import_common = static_library(
'import-common',
'import-common.c',
'import-compress.c',
'qcow2-util.c',
include_directories : includes,
dependencies : [libbzip2,
libxz,
libz,
userspace],
build_by_default : false)
importd_common_sources = files(
'import-common.c',
'import-compress.c',
'qcow2-util.c',
)
lib_import_common = static_library(
'import-common',
sources : importd_common_sources,
include_directories : includes,
dependencies : [
libbzip2,
libxz,
libz,
userspace,
],
build_by_default : false)
common_libs = [
lib_import_common,
libshared,
]
common_deps = [
libbzip2,
libcurl,
libxz,
libz,
]
executables += [
libexec_template + {
'name' : 'systemd-importd',
'dbus' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_importd_sources,
'dependencies' : threads,
},
libexec_template + {
'name' : 'systemd-pull',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_pull_sources,
'link_with' : common_libs,
'dependencies' : common_deps + [
lib_openssl_or_gcrypt,
],
},
libexec_template + {
'name' : 'systemd-import',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_import_sources,
'link_with' : common_libs,
'dependencies' : common_deps,
},
libexec_template + {
'name' : 'systemd-import-fs',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_import_fs_sources,
'link_with' : common_libs,
},
libexec_template + {
'name' : 'systemd-export',
'public' : true,
'conditions' : ['ENABLE_IMPORTD'],
'sources' : systemd_export_sources,
'link_with' : common_libs,
'dependencies' : common_deps,
},
]
if conf.get('ENABLE_IMPORTD') == 1
install_data('org.freedesktop.import1.conf',
install_dir : dbuspolicydir)
install_data('org.freedesktop.import1.service',

View File

@ -1,9 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
systemd_machined_sources = files(
'machined.c',
)
libmachine_core_sources = files(
'image-dbus.c',
'machine-dbus.c',
@ -22,6 +18,31 @@ libmachine_core = static_library(
userspace],
build_by_default : false)
executables += [
libexec_template + {
'name' : 'systemd-machined',
'dbus' : true,
'conditions' : ['ENABLE_MACHINED'],
'sources' : files('machined.c'),
'link_with' : [
libmachine_core,
libshared,
],
},
executable_template + {
'name' : 'machinectl',
'public' : true,
'conditions' : ['ENABLE_MACHINED'],
'sources' : files('machinectl.c'),
'dependencies' : [
liblz4,
libxz,
libzstd,
threads,
],
},
]
if conf.get('ENABLE_MACHINED') == 1
install_data('org.freedesktop.machine1.conf',
install_dir : dbuspolicydir)