]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
meson/daemon/lua: install modules
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 25 Jan 2019 09:36:08 +0000 (10:36 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:41:48 +0000 (10:41 +0100)
daemon/lua/meson.build [new file with mode: 0644]
daemon/meson.build
meson.build

diff --git a/daemon/lua/meson.build b/daemon/lua/meson.build
new file mode 100644 (file)
index 0000000..19beee9
--- /dev/null
@@ -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(),
+)
index f88f03f2de642cb367c781cda9ee633dfc66909a..c58c5c86523743bea68b59a98ca4ef642e589e23 100644 (file)
@@ -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')
index 6d144ab8ed8b3ddeb0c463e276d11af2a36d333c..963944445a72a64edee347ecf00b20179fb16b78 100644 (file)
@@ -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'),