From: Tomas Krizek Date: Fri, 25 Jan 2019 09:36:08 +0000 (+0100) Subject: meson/daemon/lua: install modules X-Git-Tag: v4.0.0~24^2~243 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d91f34101cd42ed9e51cd2fcdb57c9fcd704eca;p=thirdparty%2Fknot-resolver.git meson/daemon/lua: install modules --- diff --git a/daemon/lua/meson.build b/daemon/lua/meson.build new file mode 100644 index 000000000..19beee952 --- /dev/null +++ b/daemon/lua/meson.build @@ -0,0 +1,19 @@ +lua_modules_daemon = [ + 'kres', + 'kres-gen', + #'trust_anchors', # TODO + 'zonefile', +] + +embed_lua = generator( + find_program('../../scripts/embed-lua.sh'), + arguments: ['@INPUT@'], + output: '@BASENAME@.inc', + capture: true, +) + +kresd_lua = embed_lua.process( + 'sandbox.lua', + 'config.lua', + preserve_path_from: meson.source_root(), +) diff --git a/daemon/meson.build b/daemon/meson.build index f88f03f2d..c58c5c865 100644 --- a/daemon/meson.build +++ b/daemon/meson.build @@ -13,23 +13,6 @@ kresd_sources = [ 'zimport.c', ] -embed_lua = generator( - find_program('../scripts/embed-lua.sh'), - arguments: ['@INPUT@'], - output: '@BASENAME@.inc', - capture: true, -) - -kresd_lua = embed_lua.process( - 'lua/sandbox.lua', - 'lua/config.lua', - preserve_path_from: meson.source_root(), -) - - -luajit_has_setfuncs = run_command( - 'pkg-config', ['luajit', '--atleast-version', '2.1.0-beta3'] - ).returncode() == 0 ? '1' : '0' lib_suffix = '.so' # TODO seek&destroy LIBEXT @@ -37,6 +20,11 @@ if host_machine.system() == 'darwin' lib_suffix = '.dylib' endif +luajit_has_setfuncs = run_command( + 'pkg-config', ['luajit', '--atleast-version', '2.1.0-beta3'] + ).returncode() == 0 ? '1' : '0' + + # daemon CFLAGS c_args = [ '-fPIE', # TODO pie=true since 0.49.0 @@ -82,6 +70,9 @@ if libsystemd.found() endif +subdir('lua') + + # build if skip_daemon warning('kresd daemon: skipping build') diff --git a/meson.build b/meson.build index 6d144ab8e..963944445 100644 --- a/meson.build +++ b/meson.build @@ -137,6 +137,10 @@ library( # TODO: dnstap + +# install + +## install lua modules lua_modules = [ 'daf', 'detect_time_jump', @@ -165,6 +169,13 @@ foreach mod : lua_modules ) endforeach +foreach mod : lua_modules_daemon + install_data( + join_paths('daemon', 'lua', mod + '.lua'), + install_dir: modules_dir, + ) +endforeach + install_data( 'modules/daf/daf.js', install_dir: join_paths(modules_dir, 'daf'),