aboutsummaryrefslogtreecommitdiff
path: root/src/service/gns/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/gns/meson.build')
-rw-r--r--src/service/gns/meson.build210
1 files changed, 210 insertions, 0 deletions
diff --git a/src/service/gns/meson.build b/src/service/gns/meson.build
new file mode 100644
index 000000000..b82694026
--- /dev/null
+++ b/src/service/gns/meson.build
@@ -0,0 +1,210 @@
1libgnunetgns_src = ['gns_api.c', 'gns_tld_api.c']
2
3gnunetservicegns_src = ['gnunet-service-gns.c',
4 'gnunet-service-gns_resolver.c',
5 'gnunet-service-gns_interceptor.c']
6
7gnunetgnsproxy_src = ['gnunet-gns-proxy.c']
8
9configure_file(input : 'gns.conf.in',
10 output : 'gns.conf',
11 configuration : cdata,
12 install: true,
13 install_dir: pkgcfgdir)
14configure_file(input : 'tlds.conf',
15 output : 'tlds.conf',
16 configuration : cdata,
17 install: true,
18 install_dir: pkgcfgdir)
19
20configure_file(input : 'gnunet-gns-proxy-setup-ca.in',
21 output : 'gnunet-gns-proxy-setup-ca',
22 configuration : cdata,
23 install: true,
24 install_dir: get_option('bindir'))
25
26install_data('gnunet-gns-proxy-ca.template',
27 install_dir: get_option('datadir')/'gnunet')
28
29if get_option('monolith')
30 foreach p : libgnunetgns_src + gnunetservicegns_src
31 gnunet_src += 'gns/' + p
32 endforeach
33 subdir_done()
34endif
35
36libgnunetgns = library('gnunetgns',
37 libgnunetgns_src,
38 soversion: '0',
39 version: '0.0.0',
40 dependencies: [libgnunetutil_dep,
41 libgnunetgnsrecord_dep,
42 libgnunetidentity_dep],
43 include_directories: [incdir, configuration_inc],
44 install: true,
45 install_dir: get_option('libdir'))
46libgnunetgns_dep = declare_dependency(link_with : libgnunetgns)
47pkg.generate(libgnunetgns, url: 'https://www.gnunet.org',
48 description : 'Provides API to access the GNU Name System')
49
50shared_module('gnunet_plugin_gnsrecord_gns',
51 ['plugin_gnsrecord_gns.c'],
52 dependencies: [libgnunetutil_dep,
53 libgnunetgnsrecord_dep,
54 libgnunetidentity_dep],
55 include_directories: [incdir, configuration_inc],
56 install: true,
57 install_dir: get_option('libdir')/'gnunet')
58shared_module('gnunet_plugin_block_gns',
59 ['plugin_block_gns.c'],
60 dependencies: [libgnunetutil_dep,
61 libgnunetgnsrecord_dep,
62 libgnunetblockgroup_dep],
63 include_directories: [incdir, configuration_inc],
64 install:true,
65 install_dir: get_option('libdir')/'gnunet')
66shared_module('gnunet_plugin_rest_gns',
67 ['plugin_rest_gns.c'],
68 dependencies: [libgnunetrest_dep,
69 libgnunetgnsrecord_dep,
70 libgnunetgnsrecordjson_dep,
71 libgnunetgns_dep,
72 libgnunetutil_dep,
73 json_dep,
74 mhd_dep],
75 include_directories: [incdir, configuration_inc],
76 install: true,
77 install_dir: get_option('libdir') / 'gnunet')
78
79
80executable ('gnunet-gns',
81 'gnunet-gns.c',
82 dependencies: [libgnunetgns_dep,
83 libgnunetgnsrecord_dep,
84 idn_dep,
85 libgnunetutil_dep],
86 include_directories: [incdir, configuration_inc],
87 install: true,
88 install_dir: get_option('bindir'))
89executable ('gnunet-gns-proxy',
90 gnunetgnsproxy_src,
91 dependencies: [libgnunetgns_dep,
92 libgnunetutil_dep,
93 mhd_dep,
94 idn_dep,
95 curl_dep,
96 gnutls_dep,
97 libgnunetidentity_dep],
98 include_directories: [incdir, configuration_inc],
99 install: true,
100 install_dir: get_option('libdir') / 'gnunet' / 'libexec')
101
102executable ('gnunet-service-gns',
103 gnunetservicegns_src,
104 dependencies: [libgnunetgns_dep,
105 libgnunetutil_dep,
106 libgnunetstatistics_dep,
107 libgnunetcore_dep,
108 libgnunetdht_dep,
109 libgnunetdns_dep,
110 idn_dep,
111 libgnunetidentity_dep,
112 libgnunetnamecache_dep,
113 libgnunetrevocation_dep,
114 libgnunetgnsrecord_dep,
115 libgnunetcadet_dep,
116 libgnunetblock_dep],
117 include_directories: [incdir, configuration_inc],
118 install: true,
119 install_dir: get_option('libdir') / 'gnunet' / 'libexec')
120executable ('gnunet-bcd',
121 ['gnunet-bcd.c'],
122 dependencies: [libgnunetgns_dep,
123 libgnunetutil_dep,
124 libgnunetstatistics_dep,
125 libgnunetcore_dep,
126 libgnunetdht_dep,
127 libgnunetdns_dep,
128 mhd_dep,
129 idn_dep,
130 libgnunetidentity_dep,
131 libgnunetnamecache_dep,
132 libgnunetrevocation_dep,
133 libgnunetgnsrecord_dep,
134 libgnunetcadet_dep,
135 libgnunetblock_dep],
136 include_directories: [incdir, configuration_inc],
137 install: true,
138 install_dir: get_option('libdir') / 'gnunet' / 'libexec')
139executable ('gnunet-dns2gns',
140 ['gnunet-dns2gns.c'],
141 dependencies: [libgnunetgns_dep,
142 libgnunetutil_dep,
143 libgnunetstatistics_dep,
144 libgnunetvpn_dep,
145 libgnunetcore_dep,
146 libgnunetdht_dep,
147 libgnunetdns_dep,
148 idn_dep,
149 libgnunetidentity_dep,
150 libgnunetnamecache_dep,
151 libgnunetrevocation_dep,
152 libgnunetgnsrecord_dep,
153 libgnunetcadet_dep,
154 libgnunetblock_dep],
155 include_directories: [incdir, configuration_inc],
156 install: true,
157 install_dir: get_option('libdir') / 'gnunet' / 'libexec')
158
159
160if have_nss
161 subdir('nss')
162endif
163
164testgns = [
165 'test_dns2gns',
166 'test_gns_at_lookup',
167 'test_gns_caa_lookup',
168 'test_gns_config_lookup',
169 'test_gns_delegated_lookup',
170 'test_gns_dht_lookup',
171 'test_gns_gns2dns_cname_lookup',
172 'test_gns_gns2dns_lookup',
173 'test_gns_gns2dns_zkey_lookup',
174 'test_gns_ipv6_lookup',
175 'test_gns_lookup',
176 'test_gns_multiple_record_lookup',
177 'test_gns_mx_lookup',
178 'test_gns_quickupdate',
179 'test_gns_redirect_lookup',
180 'test_gns_rel_expiration',
181 'test_gns_revocation',
182 'test_gns_soa_lookup',
183 'test_gns_txt_lookup',
184 'test_gns_zkey_lookup',
185 'test_plugin_rest_gns',
186]
187
188testconfigs = [
189 'test_dns2gns.conf',
190 'test_gns_defaults.conf',
191 'test_gns_lookup.conf',
192 'test_gns_lookup_peer1.conf',
193 'test_gns_lookup_peer2.conf',
194 'test_gns_proxy.conf',
195 'test_gns_simple_lookup.conf'
196]
197
198foreach f : testconfigs
199 configure_file(input: f, output: f, copy: true)
200endforeach
201
202foreach t : testgns
203
204 test_filename = t + '.sh'
205 test_file = configure_file(input : test_filename,
206 output : test_filename,
207 copy: true)
208
209 test(t, test_file, suite: 'gns', workdir: meson.current_build_dir(), is_parallel: false)
210endforeach