mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +00:00
[#3729] Began bin
This commit is contained in:
committed by
Andrei Pavel
parent
570c6354b3
commit
4eb38d13f7
@@ -118,6 +118,10 @@ conf_data = configuration_data(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#### Programs
|
||||||
|
|
||||||
|
python_exe = find_program('python3', 'python', required: false)
|
||||||
|
|
||||||
#### Dependencies
|
#### Dependencies
|
||||||
|
|
||||||
boost = dependency('boost', version: '>=1.66')
|
boost = dependency('boost', version: '>=1.66')
|
||||||
@@ -350,6 +354,7 @@ INCLUDES = [
|
|||||||
#### Build Starts Here
|
#### Build Starts Here
|
||||||
|
|
||||||
LIBS_BUILT_SO_FAR = []
|
LIBS_BUILT_SO_FAR = []
|
||||||
|
subdir('tools')
|
||||||
subdir('src')
|
subdir('src')
|
||||||
subdir('fuzz')
|
subdir('fuzz')
|
||||||
if have_premium
|
if have_premium
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
kea_admin_conf_data = configuration_data()
|
kea_admin_conf_data = configuration_data()
|
||||||
kea_admin_conf_data.set('prefix', get_option('prefix'))
|
kea_admin_conf_data.set('prefix', PREFIX)
|
||||||
kea_admin_conf_data.set('exec_prefix', '${prefix}')
|
kea_admin_conf_data.set('exec_prefix', '${prefix}')
|
||||||
kea_admin_conf_data.set('datarootdir', '${prefix}/' + get_option('datadir'))
|
DATADIR = get_option('datadir')
|
||||||
|
kea_admin_conf_data.set('datarootdir', '${prefix}/' + DATADIR)
|
||||||
kea_admin_conf_data.set('PACKAGE', 'kea')
|
kea_admin_conf_data.set('PACKAGE', 'kea')
|
||||||
kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
|
kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
|
||||||
kea_admin_conf_data.set('PACKAGE_VERSION', project_version)
|
kea_admin_conf_data.set('PACKAGE_VERSION', project_version)
|
||||||
@@ -14,6 +15,14 @@ configure_file(
|
|||||||
input: 'kea-admin.in',
|
input: 'kea-admin.in',
|
||||||
output: 'kea-admin',
|
output: 'kea-admin',
|
||||||
configuration: kea_admin_conf_data,
|
configuration: kea_admin_conf_data,
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('sbindir'),
|
||||||
|
)
|
||||||
|
adminscriptsdir = f'@DATADIR@/kea/scripts'
|
||||||
|
configure_file(
|
||||||
|
input: 'admin-utils.sh.in',
|
||||||
|
output: 'admin-utils.sh',
|
||||||
|
copy: true,
|
||||||
|
install: true,
|
||||||
|
install_dir: adminscriptsdir,
|
||||||
)
|
)
|
||||||
configure_file(input: 'admin-utils.sh.in', output: 'admin-utils.sh', copy: true)
|
|
||||||
# install?
|
|
||||||
|
26
src/bin/agent/meson.build
Normal file
26
src/bin/agent/meson.build
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
agent_lib = static_library(
|
||||||
|
'agent',
|
||||||
|
'agent_lexer.cc',
|
||||||
|
'agent_parser.cc',
|
||||||
|
'ca_cfg_mgr.cc',
|
||||||
|
'ca_command_mgr.cc',
|
||||||
|
'ca_controller.cc',
|
||||||
|
'ca_log.cc',
|
||||||
|
'ca_messages.cc',
|
||||||
|
'ca_process.cc',
|
||||||
|
'ca_response_creator.cc',
|
||||||
|
'parser_context.cc',
|
||||||
|
'simple_parser.cc',
|
||||||
|
dependencies: [crypto],
|
||||||
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
link_with: LIBS_BUILT_SO_FAR,
|
||||||
|
)
|
||||||
|
executable(
|
||||||
|
'kea-ctrl-agent',
|
||||||
|
'main.cc',
|
||||||
|
dependencies: [crypto],
|
||||||
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
install: true,
|
||||||
|
install_dir: 'sbin',
|
||||||
|
link_with: [agent_lib] + LIBS_BUILT_SO_FAR,
|
||||||
|
)
|
30
src/bin/d2/meson.build
Normal file
30
src/bin/d2/meson.build
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
d2_lib = static_library(
|
||||||
|
'd2',
|
||||||
|
'check_exists_add.cc',
|
||||||
|
'check_exists_remove.cc',
|
||||||
|
'd2_controller.cc',
|
||||||
|
'd2_lexer.cc',
|
||||||
|
'd2_parser.cc',
|
||||||
|
'd2_process.cc',
|
||||||
|
'd2_queue_mgr.cc',
|
||||||
|
'd2_update_mgr.cc',
|
||||||
|
'nc_add.cc',
|
||||||
|
'nc_remove.cc',
|
||||||
|
'parser_context.cc',
|
||||||
|
'simple_add.cc',
|
||||||
|
'simple_add_without_dhcid.cc',
|
||||||
|
'simple_remove.cc',
|
||||||
|
'simple_remove_without_dhcid.cc',
|
||||||
|
dependencies: [crypto],
|
||||||
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
link_with: LIBS_BUILT_SO_FAR,
|
||||||
|
)
|
||||||
|
executable(
|
||||||
|
'kea-dhcp-ddns',
|
||||||
|
'main.cc',
|
||||||
|
dependencies: [crypto],
|
||||||
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
install: true,
|
||||||
|
install_dir: 'sbin',
|
||||||
|
link_with: [d2_lib] + LIBS_BUILT_SO_FAR,
|
||||||
|
)
|
0
src/bin/keactrl/keactrl.in
Normal file → Executable file
0
src/bin/keactrl/keactrl.in
Normal file → Executable file
65
src/bin/keactrl/meson.build
Normal file
65
src/bin/keactrl/meson.build
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
keactrl_conf_data = configuration_data()
|
||||||
|
keactrl_conf_data.set('prefix', PREFIX)
|
||||||
|
SYSCONFDIR = get_option('sysconfdir')
|
||||||
|
keactrl_conf_data.set('sysconfdir', '${prefix}/' + SYSCONFDIR)
|
||||||
|
keactrl_conf_data.set('PACKAGE', 'kea')
|
||||||
|
keactrl_conf_data.set('exec_prefix', '${prefix}')
|
||||||
|
keactrl_conf_data.set('sbindir', '${prefix}/' + get_option('sbindir'))
|
||||||
|
if netconf_deps_found
|
||||||
|
keactrl_conf_data.set('HAVE_NETCONF', 'yes')
|
||||||
|
else
|
||||||
|
keactrl_conf_data.set('HAVE_NETCONF', 'no')
|
||||||
|
endif
|
||||||
|
keactrl_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
|
||||||
|
keactrl_conf_data.set('PACKAGE_VERSION', project_version)
|
||||||
|
keactrl_conf_data.set('runstatedir', '${prefix}/' + RUN_STATE_DIR + '/run')
|
||||||
|
keactrl_conf_data.set('localstatedir', '${prefix}/' + RUN_STATE_DIR)
|
||||||
|
kea_configfiles_destdir = f'@SYSCONFDIR@/kea'
|
||||||
|
configure_file(
|
||||||
|
input: 'keactrl.conf.in',
|
||||||
|
output: 'keactrl.conf',
|
||||||
|
configuration: keactrl_conf_data,
|
||||||
|
install_dir: kea_configfiles_destdir,
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
input: 'keactrl.in',
|
||||||
|
output: 'keactrl',
|
||||||
|
configuration: keactrl_conf_data,
|
||||||
|
install_dir: get_option('sbindir'),
|
||||||
|
)
|
||||||
|
path_replacer = f'@TOP_BUILD_DIR@/tools/path_replacer.sh'
|
||||||
|
custom_target(
|
||||||
|
input: 'kea-dhcp4.conf.pre',
|
||||||
|
output: 'kea-dhcp4.conf',
|
||||||
|
command: [path_replacer, '@INPUT@', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: kea_configfiles_destdir,
|
||||||
|
)
|
||||||
|
custom_target(
|
||||||
|
input: 'kea-dhcp6.conf.pre',
|
||||||
|
output: 'kea-dhcp6.conf',
|
||||||
|
command: [path_replacer, '@INPUT@', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: kea_configfiles_destdir,
|
||||||
|
)
|
||||||
|
custom_target(
|
||||||
|
input: 'kea-dhcp-ddns.conf.pre',
|
||||||
|
output: 'kea-dhcp-ddns.conf',
|
||||||
|
command: [path_replacer, '@INPUT@', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: kea_configfiles_destdir,
|
||||||
|
)
|
||||||
|
custom_target(
|
||||||
|
input: 'kea-ctrl-agent.conf.pre',
|
||||||
|
output: 'kea-ctrl-agent.conf',
|
||||||
|
command: [path_replacer, '@INPUT@', '@OUTPUT@'],
|
||||||
|
install: true,
|
||||||
|
install_dir: kea_configfiles_destdir,
|
||||||
|
)
|
||||||
|
custom_target(
|
||||||
|
input: 'kea-netconf.conf.pre',
|
||||||
|
output: 'kea-netconf.conf',
|
||||||
|
command: [path_replacer, '@INPUT@', '@OUTPUT@'],
|
||||||
|
install: netconf_deps_found,
|
||||||
|
install_dir: kea_configfiles_destdir,
|
||||||
|
)
|
@@ -1,10 +1,10 @@
|
|||||||
subdir('lfc')
|
subdir('lfc')
|
||||||
subdir('dhcp4')
|
subdir('dhcp4')
|
||||||
subdir('dhcp6')
|
subdir('dhcp6')
|
||||||
# subdir('d2')
|
subdir('d2')
|
||||||
# subdir('agent')
|
subdir('agent')
|
||||||
subdir('admin')
|
subdir('admin')
|
||||||
# subdir('keactrl')
|
subdir('keactrl')
|
||||||
subdir('perfdhcp')
|
subdir('perfdhcp')
|
||||||
# subdir('shell')
|
subdir('shell')
|
||||||
# subdir('netconf')
|
# subdir('netconf')
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
perfdhcplib_lib = static_library(
|
perfdhcp_lib = static_library(
|
||||||
'perfdhcplib',
|
'perfdhcp',
|
||||||
'avalanche_scen.cc',
|
'avalanche_scen.cc',
|
||||||
'basic_scen.cc',
|
'basic_scen.cc',
|
||||||
'command_options.cc',
|
'command_options.cc',
|
||||||
@@ -22,5 +22,5 @@ executable(
|
|||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: 'sbin',
|
||||||
link_with: [perfdhcplib_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [perfdhcp_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
|
0
src/bin/shell/kea-shell.in
Normal file → Executable file
0
src/bin/shell/kea-shell.in
Normal file → Executable file
40
src/bin/shell/meson.build
Normal file
40
src/bin/shell/meson.build
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
if not python_exe.found()
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
|
|
||||||
|
kea_shell_conf_data = configuration_data()
|
||||||
|
kea_shell_conf_data.set('PYTHON', python_exe.full_path())
|
||||||
|
kea_shell_conf_data.set('PACKAGE_VERSION', project_version)
|
||||||
|
kea_shell_conf_data.set('EXTENDED_VERSION', project_version + ' (tarball)')
|
||||||
|
|
||||||
|
r = run_command(
|
||||||
|
python_exe,
|
||||||
|
'-c',
|
||||||
|
'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
|
||||||
|
check: true,
|
||||||
|
)
|
||||||
|
PYTHON_SITE_PACKAGE = r.stdout().strip()
|
||||||
|
PKGPYTHONDIR = f'@PYTHON_SITE_PACKAGE@/kea'
|
||||||
|
kea_shell_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR)
|
||||||
|
configure_file(
|
||||||
|
input: 'kea-shell.in',
|
||||||
|
output: 'kea-shell',
|
||||||
|
configuration: kea_shell_conf_data,
|
||||||
|
install: true,
|
||||||
|
install_dir: get_option('sbindir'),
|
||||||
|
)
|
||||||
|
# Install into the system seti package location or not?
|
||||||
|
configure_file(
|
||||||
|
input: 'kea_conn.py',
|
||||||
|
output: 'kea_conn.py',
|
||||||
|
copy: true,
|
||||||
|
install: false,
|
||||||
|
install_dir: PKGPYTHONDIR,
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
input: 'kea_connector3.py',
|
||||||
|
output: 'kea_connector3.py',
|
||||||
|
copy: true,
|
||||||
|
install: false,
|
||||||
|
install_dir: PKGPYTHONDIR,
|
||||||
|
)
|
@@ -1,5 +1,5 @@
|
|||||||
DATADIR = get_option('datadir')
|
DATADIR = get_option('datadir')
|
||||||
INSTALL_DIR = f'@DATADIR@/kea/script/mysql'
|
INSTALL_DIR = f'@DATADIR@/kea/scripts/mysql'
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'dhcpdb_create.mysql',
|
input: 'dhcpdb_create.mysql',
|
||||||
output: 'dhcpdb_create.mysql',
|
output: 'dhcpdb_create.mysql',
|
||||||
@@ -15,15 +15,15 @@ configure_file(
|
|||||||
install_dir: INSTALL_DIR,
|
install_dir: INSTALL_DIR,
|
||||||
)
|
)
|
||||||
|
|
||||||
mysql_script_conf_data = configuration_data()
|
mysql_scripts_conf_data = configuration_data()
|
||||||
mysql_script_conf_data.set('prefix', PREFIX)
|
mysql_scripts_conf_data.set('prefix', PREFIX)
|
||||||
mysql_script_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
|
mysql_scripts_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
|
||||||
mysql_script_conf_data.set('datarootdir', '${prefix}/' + DATADIR)
|
mysql_scripts_conf_data.set('datarootdir', '${prefix}/' + DATADIR)
|
||||||
mysql_script_conf_data.set('PACKAGE_NAME', 'kea')
|
mysql_scripts_conf_data.set('PACKAGE_NAME', 'kea')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'wipe_data.sh.in',
|
input: 'wipe_data.sh.in',
|
||||||
output: 'wipe_data.sh',
|
output: 'wipe_data.sh',
|
||||||
configuration: mysql_script_conf_data,
|
configuration: mysql_scripts_conf_data,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: INSTALL_DIR,
|
install_dir: INSTALL_DIR,
|
||||||
)
|
)
|
||||||
@@ -71,7 +71,7 @@ foreach file : upgrade_scripts
|
|||||||
configure_file(
|
configure_file(
|
||||||
input: file + '.in',
|
input: file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
configuration: mysql_script_conf_data,
|
configuration: mysql_scripts_conf_data,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: INSTALL_DIR,
|
install_dir: INSTALL_DIR,
|
||||||
)
|
)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
DATADIR = get_option('datadir')
|
DATADIR = get_option('datadir')
|
||||||
INSTALL_DIR = f'@DATADIR@/kea/script/pgsql'
|
INSTALL_DIR = f'@DATADIR@/kea/scripts/pgsql'
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'dhcpdb_create.pgsql',
|
input: 'dhcpdb_create.pgsql',
|
||||||
output: 'dhcpdb_create.pgsql',
|
output: 'dhcpdb_create.pgsql',
|
||||||
@@ -15,15 +15,15 @@ configure_file(
|
|||||||
install_dir: INSTALL_DIR,
|
install_dir: INSTALL_DIR,
|
||||||
)
|
)
|
||||||
|
|
||||||
pgsql_script_conf_data = configuration_data()
|
pgsql_scripts_conf_data = configuration_data()
|
||||||
pgsql_script_conf_data.set('prefix', PREFIX)
|
pgsql_scripts_conf_data.set('prefix', PREFIX)
|
||||||
pgsql_script_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
|
pgsql_scripts_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
|
||||||
pgsql_script_conf_data.set('datarootdir', '${prefix}/' + DATADIR)
|
pgsql_scripts_conf_data.set('datarootdir', '${prefix}/' + DATADIR)
|
||||||
pgsql_script_conf_data.set('PACKAGE_NAME', 'kea')
|
pgsql_scripts_conf_data.set('PACKAGE_NAME', 'kea')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'wipe_data.sh.in',
|
input: 'wipe_data.sh.in',
|
||||||
output: 'wipe_data.sh',
|
output: 'wipe_data.sh',
|
||||||
configuration: pgsql_script_conf_data,
|
configuration: pgsql_scripts_conf_data,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: INSTALL_DIR,
|
install_dir: INSTALL_DIR,
|
||||||
)
|
)
|
||||||
@@ -66,7 +66,7 @@ foreach file : upgrade_scripts
|
|||||||
configure_file(
|
configure_file(
|
||||||
input: file + '.in',
|
input: file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
configuration: pgsql_script_conf_data,
|
configuration: pgsql_scripts_conf_data,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: INSTALL_DIR,
|
install_dir: INSTALL_DIR,
|
||||||
)
|
)
|
||||||
|
12
tools/meson.build
Normal file
12
tools/meson.build
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
tools_conf_data = configuration_data()
|
||||||
|
tools_conf_data.set('prefix', PREFIX)
|
||||||
|
tools_conf_data.set('sysconfdir', '${prefix}/' + get_option('sysconfdir'))
|
||||||
|
tools_conf_data.set('localstatedir', '${prefix}/' + get_option('localstatedir'))
|
||||||
|
tools_conf_data.set('exec_prefix', '${prefix}')
|
||||||
|
tools_conf_data.set('libdir', '${exec_prefix}/' + get_option('libdir'))
|
||||||
|
tools_conf_data.set('SEP', '+')
|
||||||
|
configure_file(
|
||||||
|
input: 'path_replacer.sh.in',
|
||||||
|
output: 'path_replacer.sh',
|
||||||
|
configuration: tools_conf_data,
|
||||||
|
)
|
Reference in New Issue
Block a user