--- /dev/null
+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(),
+)
'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
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
endif
+subdir('lua')
+
+
# build
if skip_daemon
warning('kresd daemon: skipping build')
# TODO: dnstap
+
+# install
+
+## install lua modules
lua_modules = [
'daf',
'detect_time_jump',
)
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'),