diff options
Diffstat (limited to 'src/service/dns/meson.build')
-rw-r--r-- | src/service/dns/meson.build | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/service/dns/meson.build b/src/service/dns/meson.build new file mode 100644 index 000000000..81fecd32a --- /dev/null +++ b/src/service/dns/meson.build | |||
@@ -0,0 +1,63 @@ | |||
1 | libgnunetdns_src = ['dns_api.c'] | ||
2 | |||
3 | gnunetservicedns_src = ['gnunet-service-dns.c'] | ||
4 | gnunetdnsredirector_src = ['gnunet-dns-monitor.c'] | ||
5 | gnunetdnsmonitor_src = ['gnunet-dns-redirector.c'] | ||
6 | |||
7 | configure_file(input : 'dns.conf.in', | ||
8 | output : 'dns.conf', | ||
9 | configuration : cdata, | ||
10 | install: true, | ||
11 | install_dir: pkgcfgdir) | ||
12 | |||
13 | if get_option('monolith') | ||
14 | foreach p : libgnunetdns_src + gnunetservicedns_src | ||
15 | gnunet_src += 'dns/' + p | ||
16 | endforeach | ||
17 | endif | ||
18 | |||
19 | libgnunetdns = library('gnunetdns', | ||
20 | libgnunetdns_src, | ||
21 | soversion: '0', | ||
22 | version: '0.0.0', | ||
23 | dependencies: libgnunetutil_dep, | ||
24 | include_directories: [incdir, configuration_inc], | ||
25 | install: true, | ||
26 | install_dir: get_option('libdir')) | ||
27 | libgnunetdns_dep = declare_dependency(link_with : libgnunetdns) | ||
28 | pkg.generate(libgnunetdns, url: 'https://www.gnunet.org', | ||
29 | description : 'Provides API to access GNUnet\'s DNS service (to intercept and manipulate DNS queries)') | ||
30 | |||
31 | executable ('gnunet-service-dns', | ||
32 | gnunetservicedns_src, | ||
33 | dependencies: [libgnunetdns_dep, libgnunetutil_dep, | ||
34 | libgnunetstatistics_dep], | ||
35 | include_directories: [incdir, configuration_inc], | ||
36 | install: true, | ||
37 | install_dir: get_option('libdir')/'gnunet'/'libexec') | ||
38 | executable ('gnunet-dns-monitor', | ||
39 | gnunetdnsmonitor_src, | ||
40 | dependencies: [libgnunetdns_dep, libgnunetutil_dep, libgnunetdns_dep], | ||
41 | include_directories: [incdir, configuration_inc], | ||
42 | install: false) | ||
43 | |||
44 | executable ('gnunet-dns-redirector', | ||
45 | gnunetdnsredirector_src, | ||
46 | dependencies: [libgnunetdns_dep, libgnunetutil_dep, libgnunetdns_dep], | ||
47 | include_directories: [incdir, configuration_inc], | ||
48 | install: false) | ||
49 | |||
50 | if host_machine.system() == 'linux' | ||
51 | executable ('gnunet-helper-dns', | ||
52 | ['gnunet-helper-dns.c'], | ||
53 | dependencies: [libgnunetdns_dep, libgnunetutil_dep, libgnunetdns_dep], | ||
54 | include_directories: [incdir, configuration_inc], | ||
55 | install: true, | ||
56 | install_dir: get_option('libdir')/'gnunet'/'libexec') | ||
57 | |||
58 | test_dns = configure_file(input : 'test_gnunet_dns.sh', | ||
59 | output : 'test_gnunet_dns.sh', | ||
60 | copy: true) | ||
61 | |||
62 | test('test_gnunet_gns', test_dns, suite: 'dns', workdir: meson.current_build_dir()) | ||
63 | endif | ||