diff options
Diffstat (limited to 'src/service/arm/meson.build')
-rw-r--r-- | src/service/arm/meson.build | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/service/arm/meson.build b/src/service/arm/meson.build new file mode 100644 index 000000000..56c992efe --- /dev/null +++ b/src/service/arm/meson.build | |||
@@ -0,0 +1,74 @@ | |||
1 | libgnunetarm_src = ['arm_api.c', | ||
2 | 'arm_monitor_api.c'] | ||
3 | |||
4 | gnunetservicearm_src = ['gnunet-service-arm.c'] | ||
5 | |||
6 | testarmapi_src = ['test_arm_api.c'] | ||
7 | testexpbo_src = ['test_exponential_backoff.c'] | ||
8 | testgnunetservice_src = ['test_gnunet_service_arm.c'] | ||
9 | |||
10 | configure_file(input : 'arm.conf.in', | ||
11 | output : 'arm.conf', | ||
12 | configuration : cdata, | ||
13 | install: true, | ||
14 | install_dir: pkgcfgdir) | ||
15 | |||
16 | libgnunetarm = library('gnunetarm', | ||
17 | libgnunetarm_src, | ||
18 | dependencies: libgnunetutil_dep, | ||
19 | version: '2.0.0', | ||
20 | soversion: '2', | ||
21 | include_directories: [incdir, configuration_inc], | ||
22 | install: true, | ||
23 | install_dir: get_option('libdir')) | ||
24 | pkg.generate(libgnunetarm, url: 'https://www.gnunet.org', | ||
25 | description : 'Provides API for accessing the Automated Restart Manager service') | ||
26 | libgnunetarm_dep = declare_dependency(link_with : libgnunetarm) | ||
27 | |||
28 | executable ('gnunet-service-arm', | ||
29 | gnunetservicearm_src, | ||
30 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
31 | include_directories: [incdir, configuration_inc], | ||
32 | install: true, | ||
33 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
34 | |||
35 | mockservice = executable ('mockup-service', | ||
36 | ['mockup-service.c'], | ||
37 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
38 | include_directories: [incdir, configuration_inc], | ||
39 | install: false) | ||
40 | |||
41 | testarmapi = executable ('test_arm_api', | ||
42 | testarmapi_src, | ||
43 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
44 | include_directories: [incdir, configuration_inc], | ||
45 | install: false) | ||
46 | testexpbo = executable ('test_exponential_backoff', | ||
47 | testexpbo_src, | ||
48 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
49 | include_directories: [incdir, configuration_inc], | ||
50 | install: false) | ||
51 | testgnunetservice = executable ('test_gnunet_service', | ||
52 | testgnunetservice_src, | ||
53 | dependencies: [libgnunetarm_dep, libgnunetutil_dep], | ||
54 | include_directories: [incdir, configuration_inc], | ||
55 | install: false) | ||
56 | configure_file(copy: true, | ||
57 | input: 'test_arm_api_data.conf', | ||
58 | output: 'test_arm_api_data.conf') | ||
59 | |||
60 | # FIXME: We need to convert the convoluted awk script from Makefile.am here | ||
61 | #configure_file(copy: true, | ||
62 | # input: 'test_gnunet_arm.py.in', | ||
63 | # output: 'test_gnunet_arm.py') | ||
64 | |||
65 | test('test_arm_api', testarmapi, workdir: meson.current_build_dir(), | ||
66 | is_parallel: false, | ||
67 | suite: 'arm') | ||
68 | test('test_exponential_backoff', testexpbo, workdir: meson.current_build_dir(), | ||
69 | depends: mockservice, | ||
70 | is_parallel: false, | ||
71 | timeout: 60, suite: 'arm') | ||
72 | test('test_gnunet_service_arm', testgnunetservice, workdir: meson.current_build_dir(), | ||
73 | is_parallel: false, | ||
74 | suite: 'arm') | ||