diff options
author | t3sserakt <t3ss@posteo.de> | 2023-10-18 15:48:29 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2023-10-18 15:48:29 +0200 |
commit | 67362c231f40f9a13081602b276288adf4722868 (patch) | |
tree | c61168b78e609f6587b206103e794d22699f1807 /src/service/arm/meson.build | |
parent | 3d595570d20045a97c909c02246f5cc754f7041e (diff) | |
parent | 65dbd214b80664872f6514fdd663a30e405a6ad6 (diff) | |
download | gnunet-67362c231f40f9a13081602b276288adf4722868.tar.gz gnunet-67362c231f40f9a13081602b276288adf4722868.zip |
Merge branch 'master' of ssh://git.gnunet.org/gnunet
Diffstat (limited to 'src/service/arm/meson.build')
-rw-r--r-- | src/service/arm/meson.build | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/src/service/arm/meson.build b/src/service/arm/meson.build new file mode 100644 index 000000000..bfeb0b31f --- /dev/null +++ b/src/service/arm/meson.build | |||
@@ -0,0 +1,86 @@ | |||
1 | libgnunetarm_src = ['arm_api.c', | ||
2 | 'arm_monitor_api.c'] | ||
3 | |||
4 | gnunetservicearm_src = ['gnunet-service-arm.c'] | ||
5 | |||
6 | gnunetarm_src = ['gnunet-arm.c'] | ||
7 | |||
8 | testarmapi_src = ['test_arm_api.c'] | ||
9 | testexpbo_src = ['test_exponential_backoff.c'] | ||
10 | testgnunetservice_src = ['test_gnunet_service_arm.c'] | ||
11 | |||
12 | configure_file(input : 'arm.conf.in', | ||
13 | output : 'arm.conf', | ||
14 | configuration : cdata, | ||
15 | install: true, | ||
16 | install_dir: pkgcfgdir) | ||
17 | |||
18 | if get_option('monolith') | ||
19 | foreach p : libgnunetarm_src + gnunetservicearm_src | ||
20 | gnunet_src += 'arm/' + p | ||
21 | endforeach | ||
22 | subdir_done() | ||
23 | endif | ||
24 | |||
25 | libgnunetarm = library('gnunetarm', | ||
26 | libgnunetarm_src, | ||
27 | dependencies: libgnunetutil_dep, | ||
28 | version: '2.0.0', | ||
29 | soversion: '2', | ||
30 | include_directories: [incdir, configuration_inc], | ||
31 | install: true, | ||
32 | install_dir: get_option('libdir')) | ||
33 | pkg.generate(libgnunetarm, url: 'https://www.gnunet.org', | ||
34 | description : 'Provides API for accessing the Automated Restart Manager service') | ||
35 | libgnunetarm_dep = declare_dependency(link_with : libgnunetarm) | ||
36 | executable ('gnunet-arm', | ||
37 | gnunetarm_src, | ||
38 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
39 | include_directories: [incdir, configuration_inc], | ||
40 | install: true, | ||
41 | install_dir: get_option('bindir')) | ||
42 | |||
43 | executable ('gnunet-service-arm', | ||
44 | gnunetservicearm_src, | ||
45 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
46 | include_directories: [incdir, configuration_inc], | ||
47 | install: true, | ||
48 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
49 | |||
50 | mockservice = executable ('mockup-service', | ||
51 | ['mockup-service.c'], | ||
52 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
53 | include_directories: [incdir, configuration_inc], | ||
54 | install: false) | ||
55 | |||
56 | testarmapi = executable ('test_arm_api', | ||
57 | testarmapi_src, | ||
58 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
59 | include_directories: [incdir, configuration_inc], | ||
60 | install: false) | ||
61 | testexpbo = executable ('test_exponential_backoff', | ||
62 | testexpbo_src, | ||
63 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
64 | include_directories: [incdir, configuration_inc], | ||
65 | install: false) | ||
66 | testgnunetservice = executable ('test_gnunet_service', | ||
67 | testgnunetservice_src, | ||
68 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
69 | include_directories: [incdir, configuration_inc], | ||
70 | install: false) | ||
71 | configure_file(copy: true, | ||
72 | input: 'test_arm_api_data.conf', | ||
73 | output: 'test_arm_api_data.conf') | ||
74 | |||
75 | # FIXME: We need to convert the convoluted awk script from Makefile.am here | ||
76 | #configure_file(copy: true, | ||
77 | # input: 'test_gnunet_arm.py.in', | ||
78 | # output: 'test_gnunet_arm.py') | ||
79 | |||
80 | test('test_arm_api', testarmapi, workdir: meson.current_build_dir(), | ||
81 | suite: 'arm') | ||
82 | test('test_exponential_backoff', testexpbo, workdir: meson.current_build_dir(), | ||
83 | depends: mockservice, | ||
84 | timeout: 60, suite: 'arm') | ||
85 | test('test_gnunet_service_arm', testgnunetservice, workdir: meson.current_build_dir(), | ||
86 | suite: 'arm') | ||