1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
|
libgnunetdatacache_src = ['datacache.c']
configure_file(input : 'datacache.conf',
output : 'datacache.conf',
configuration : cdata,
install: true,
install_dir: pkgcfgdir)
install_data ('datacache-0001.sql',
'datacache-drop.sql',
install_dir: get_option('datadir')/'gnunet'/'sql')
if get_option('monolith')
foreach p : libgnunetdatacache_src
gnunet_src += 'datacache/' + p
endforeach
subdir_done()
endif
libgnunetdatacache = library('gnunetdatacache',
libgnunetdatacache_src,
soversion: '0',
version: '0.0.1',
dependencies: [libgnunetutil_dep, libgnunetstatistics_dep],
include_directories: [incdir, configuration_inc],
install: true,
install_dir: get_option('libdir'))
libgnunetdatacache_dep = declare_dependency(link_with : libgnunetdatacache)
pkg.generate(libgnunetdatacache, url: 'https://www.gnunet.org',
description : 'Provides datacache API for temporary storage to disk')
shared_module('gnunet_plugin_datacache_sqlite',
['plugin_datacache_sqlite.c'],
dependencies: [libgnunetutil_dep,
libgnunetdatacache_dep,
sqlite_dep,
libgnunetsq_dep],
include_directories: [incdir, configuration_inc],
install: true,
install_dir: get_option('libdir')/'gnunet')
shared_module('gnunet_plugin_datacache_heap',
['plugin_datacache_heap.c'],
dependencies: [libgnunetutil_dep,
libgnunetdatacache_dep],
include_directories: [incdir, configuration_inc],
install: true,
install_dir: get_option('libdir')/'gnunet')
if pq_dep.found()
shared_module('gnunet_plugin_datacache_postgres',
['plugin_datacache_postgres.c'],
dependencies: [libgnunetutil_dep,
libgnunetdatacache_dep,
pq_dep,
libgnunetpq_dep],
include_directories: [incdir, configuration_inc],
install: true,
install_dir: get_option('libdir')/'gnunet')
endif
testdc_sqlite = executable ('test_datacache_sqlite',
['test_datacache.c'],
dependencies: [
libgnunetdatacache_dep,
libgnunetutil_dep,
libgnunettesting_dep
],
include_directories: [incdir, configuration_inc],
install: false)
testdc_quota_sqlite = executable ('test_datacache_quota_sqlite',
['test_datacache_quota.c'],
dependencies: [
libgnunetdatacache_dep,
libgnunetutil_dep,
libgnunettesting_dep
],
include_directories: [incdir, configuration_inc],
install: false)
testdc_heap = executable ('test_datacache_heap',
['test_datacache.c'],
dependencies: [
libgnunetdatacache_dep,
libgnunetutil_dep,
libgnunettesting_dep
],
include_directories: [incdir, configuration_inc],
install: false)
testdc_quota_heap = executable ('test_datacache_quota_heap',
['test_datacache_quota.c'],
dependencies: [
libgnunetdatacache_dep,
libgnunetutil_dep,
libgnunettesting_dep
],
include_directories: [incdir, configuration_inc],
install: false)
testdc_pq = executable ('test_datacache_postgres',
['test_datacache.c'],
dependencies: [
libgnunetdatacache_dep,
libgnunetutil_dep,
libgnunettesting_dep
],
include_directories: [incdir, configuration_inc],
install: false)
testdc_quota_pq = executable ('test_datacache_quota_postgres',
['test_datacache_quota.c'],
dependencies: [
libgnunetdatacache_dep,
libgnunetutil_dep,
libgnunettesting_dep
],
include_directories: [incdir, configuration_inc],
install: false)
configure_file(input : 'test_datacache_data_sqlite.conf',
output : 'test_datacache_data_sqlite.conf',
copy: true)
configure_file(input : 'test_datacache_data_heap.conf',
output : 'test_datacache_data_heap.conf',
copy: true)
configure_file(input : 'test_datacache_data_postgres.conf',
output : 'test_datacache_data_postgres.conf',
copy: true)
test('test_datacache_sqlite', testdc_sqlite,
suite: 'datacache', workdir: meson.current_build_dir())
test('test_datacache_quota_sqlite', testdc_quota_sqlite,
suite: 'datacache', workdir: meson.current_build_dir())
test('test_datacache_heap', testdc_heap,
suite: 'datacache', workdir: meson.current_build_dir())
test('test_datacache_quota_heap', testdc_quota_heap,
suite: 'datacache', workdir: meson.current_build_dir())
test('test_datacache_postgres', testdc_pq,
suite: 'datacache', workdir: meson.current_build_dir())
test('test_datacache_quota_postgres', testdc_quota_pq,
suite: 'datacache', workdir: meson.current_build_dir())
|