diff options
Diffstat (limited to 'src/service/datastore/meson.build')
-rw-r--r-- | src/service/datastore/meson.build | 206 |
1 files changed, 206 insertions, 0 deletions
diff --git a/src/service/datastore/meson.build b/src/service/datastore/meson.build new file mode 100644 index 000000000..c49bfe449 --- /dev/null +++ b/src/service/datastore/meson.build | |||
@@ -0,0 +1,206 @@ | |||
1 | libgnunetdatastore_src = ['datastore_api.c'] | ||
2 | |||
3 | gnunetservicedatastore_src = ['gnunet-service-datastore.c'] | ||
4 | |||
5 | configure_file(input : 'datastore.conf.in', | ||
6 | output : 'datastore.conf', | ||
7 | configuration : cdata, | ||
8 | install: true, | ||
9 | install_dir: pkgcfgdir) | ||
10 | |||
11 | install_data ('datastore-0001.sql', | ||
12 | 'datastore-drop.sql', | ||
13 | install_dir: get_option('datadir')/'gnunet'/'sql') | ||
14 | |||
15 | if get_option('monolith') | ||
16 | foreach p : libgnunetdatastore_src + gnunetservicedatastore_src | ||
17 | gnunet_src += 'datastore/' + p | ||
18 | endforeach | ||
19 | subdir_done() | ||
20 | endif | ||
21 | |||
22 | libgnunetdatastore = library('gnunetdatastore', | ||
23 | libgnunetdatastore_src, | ||
24 | soversion: '1', | ||
25 | version: '1.0.0', | ||
26 | dependencies: [libgnunetutil_dep, | ||
27 | libgnunetstatistics_dep, | ||
28 | libgnunetdatacache_dep], | ||
29 | include_directories: [incdir, configuration_inc], | ||
30 | install: true, | ||
31 | install_dir: get_option('libdir')) | ||
32 | libgnunetdatastore_dep = declare_dependency(link_with : libgnunetdatastore) | ||
33 | pkg.generate(libgnunetdatastore, url: 'https://www.gnunet.org', | ||
34 | description : 'Management API for the datastore for persistent storage to disk') | ||
35 | |||
36 | shared_module('gnunet_plugin_datastore_sqlite', | ||
37 | ['plugin_datastore_sqlite.c'], | ||
38 | dependencies: [libgnunetutil_dep, | ||
39 | libgnunetdatastore_dep, | ||
40 | sqlite_dep, | ||
41 | libgnunetsq_dep], | ||
42 | include_directories: [incdir, configuration_inc], | ||
43 | install: true, | ||
44 | install_dir: get_option('libdir')/'gnunet') | ||
45 | |||
46 | shared_module('gnunet_plugin_datastore_heap', | ||
47 | ['plugin_datastore_heap.c'], | ||
48 | dependencies: [libgnunetutil_dep, | ||
49 | libgnunetdatacache_dep], | ||
50 | include_directories: [incdir, configuration_inc], | ||
51 | install: true, | ||
52 | install_dir: get_option('libdir')/'gnunet') | ||
53 | |||
54 | if pq_dep.found() | ||
55 | shared_module('gnunet_plugin_datastore_postgres', | ||
56 | ['plugin_datastore_postgres.c'], | ||
57 | dependencies: [libgnunetutil_dep, | ||
58 | libgnunetdatastore_dep, | ||
59 | pq_dep, | ||
60 | libgnunetpq_dep], | ||
61 | include_directories: [incdir, configuration_inc], | ||
62 | install: true, | ||
63 | install_dir: get_option('libdir')/'gnunet') | ||
64 | endif | ||
65 | |||
66 | executable ('gnunet-datastore', | ||
67 | ['gnunet-datastore.c'], | ||
68 | dependencies: [libgnunetdatastore_dep, | ||
69 | libgnunetutil_dep, | ||
70 | libgnunetstatistics_dep, | ||
71 | libgnunetdatacache_dep], | ||
72 | include_directories: [incdir, configuration_inc], | ||
73 | install: true, | ||
74 | install_dir: get_option('bindir')) | ||
75 | executable ('gnunet-service-datastore', | ||
76 | gnunetservicedatastore_src, | ||
77 | dependencies: [libgnunetdatastore_dep, | ||
78 | libgnunetutil_dep, | ||
79 | libgnunetstatistics_dep, | ||
80 | libgnunetdatacache_dep], | ||
81 | include_directories: [incdir, configuration_inc], | ||
82 | install: true, | ||
83 | install_dir: get_option('libdir')/'gnunet'/'libexec') | ||
84 | |||
85 | testds_sqlite = executable ('test_store_api_sqlite', | ||
86 | ['test_datastore_api.c'], | ||
87 | dependencies: [ | ||
88 | libgnunetdatastore_dep, | ||
89 | libgnunetutil_dep, | ||
90 | libgnunettesting_dep | ||
91 | ], | ||
92 | include_directories: [incdir, configuration_inc], | ||
93 | install: false) | ||
94 | |||
95 | testds_mgmt_sqlite = executable ('test_datastore_api_management_sqlite', | ||
96 | ['test_datastore_api_management.c'], | ||
97 | dependencies: [ | ||
98 | libgnunetdatastore_dep, | ||
99 | libgnunetutil_dep, | ||
100 | libgnunettesting_dep | ||
101 | ], | ||
102 | include_directories: [incdir, configuration_inc], | ||
103 | install: false) | ||
104 | |||
105 | testds_plugin_sqlite = executable ('test_plugin_datastore_sqlite', | ||
106 | ['test_plugin_datastore.c'], | ||
107 | dependencies: [ | ||
108 | libgnunetdatastore_dep, | ||
109 | libgnunetutil_dep, | ||
110 | libgnunettesting_dep | ||
111 | ], | ||
112 | include_directories: [incdir, configuration_inc], | ||
113 | install: false) | ||
114 | |||
115 | testds_heap = executable ('test_datastore_api_heap', | ||
116 | ['test_datastore_api.c'], | ||
117 | dependencies: [ | ||
118 | libgnunetdatastore_dep, | ||
119 | libgnunetutil_dep, | ||
120 | libgnunettesting_dep | ||
121 | ], | ||
122 | include_directories: [incdir, configuration_inc], | ||
123 | install: false) | ||
124 | |||
125 | testds_mgmt_heap = executable ('test_datastore_api_management_heap', | ||
126 | ['test_datastore_api_management.c'], | ||
127 | dependencies: [ | ||
128 | libgnunetdatastore_dep, | ||
129 | libgnunetutil_dep, | ||
130 | libgnunettesting_dep | ||
131 | ], | ||
132 | include_directories: [incdir, configuration_inc], | ||
133 | install: false) | ||
134 | |||
135 | testds_plugin_heap = executable ('test_plugin_datastore_heap', | ||
136 | ['test_plugin_datastore.c'], | ||
137 | dependencies: [ | ||
138 | libgnunetdatastore_dep, | ||
139 | libgnunetutil_dep, | ||
140 | libgnunettesting_dep | ||
141 | ], | ||
142 | include_directories: [incdir, configuration_inc], | ||
143 | install: false) | ||
144 | |||
145 | testds_pq = executable ('test_datastore_api_postgres', | ||
146 | ['test_datastore_api.c'], | ||
147 | dependencies: [ | ||
148 | libgnunetdatastore_dep, | ||
149 | libgnunetutil_dep, | ||
150 | libgnunettesting_dep | ||
151 | ], | ||
152 | include_directories: [incdir, configuration_inc], | ||
153 | install: false) | ||
154 | |||
155 | testds_plugin_pq = executable ('test_plugin_datastore_postgres', | ||
156 | ['test_plugin_datastore.c'], | ||
157 | dependencies: [ | ||
158 | libgnunetdatastore_dep, | ||
159 | libgnunetutil_dep, | ||
160 | libgnunettesting_dep | ||
161 | ], | ||
162 | include_directories: [incdir, configuration_inc], | ||
163 | install: false) | ||
164 | |||
165 | testds_mgmt_pq = executable ('test_datastore_api_management_postgres', | ||
166 | ['test_datastore_api_management.c'], | ||
167 | dependencies: [ | ||
168 | libgnunetdatastore_dep, | ||
169 | libgnunetutil_dep, | ||
170 | libgnunettesting_dep | ||
171 | ], | ||
172 | include_directories: [incdir, configuration_inc], | ||
173 | install: false) | ||
174 | |||
175 | configure_file(input : 'test_defaults.conf', | ||
176 | output : 'test_defaults.conf', | ||
177 | copy: true) | ||
178 | configure_file(input : 'test_datastore_api_data_sqlite.conf', | ||
179 | output : 'test_datastore_api_data_sqlite.conf', | ||
180 | copy: true) | ||
181 | configure_file(input : 'test_datastore_api_data_heap.conf', | ||
182 | output : 'test_datastore_api_data_heap.conf', | ||
183 | copy: true) | ||
184 | configure_file(input : 'test_datastore_api_data_postgres.conf', | ||
185 | output : 'test_datastore_api_data_postgres.conf', | ||
186 | copy: true) | ||
187 | |||
188 | test('test_datastore_api_sqlite', testds_sqlite, | ||
189 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
190 | test('test_datastore_api_management_sqlite', testds_mgmt_sqlite, | ||
191 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
192 | test('test_plugin_datastore_sqlite', testds_plugin_sqlite, | ||
193 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
194 | test('test_datastore_api_heap', testds_heap, | ||
195 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
196 | test('test_datastore_api_management_heap', testds_mgmt_heap, | ||
197 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
198 | test('test_plugin_datastore_heap', testds_plugin_heap, | ||
199 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
200 | test('test_datastore_api_postgres', testds_pq, | ||
201 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
202 | test('test_datastore_api_management_postgres', testds_mgmt_pq, | ||
203 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
204 | test('test_plugin_datastore_postgres', testds_plugin_pq, | ||
205 | suite: 'datastore', workdir: meson.current_build_dir()) | ||
206 | |||