]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/journal-remote/meson.build
journal-remote: split out µhttpd support and main() into a separate file
[thirdparty/systemd.git] / src / journal-remote / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
4
5 systemd_journal_upload_sources = files('''
6 journal-upload.h
7 journal-upload.c
8 journal-upload-journal.c
9 '''.split())
10
11 libsystemd_journal_remote = static_library(
12 'systemd-journal-remote',
13 'journal-remote-parse.h',
14 'journal-remote-parse.c',
15 'journal-remote-write.h',
16 'journal-remote-write.c',
17 'journal-remote.h',
18 'journal-remote.c',
19 'microhttpd-util.h',
20 'microhttpd-util.c',
21 include_directories : includes,
22 dependencies : [threads,
23 libmicrohttpd,
24 libgnutls,
25 libxz,
26 liblz4],
27 install : false)
28
29 systemd_journal_remote_sources = files('''
30 journal-remote-main.c
31 '''.split())
32
33 systemd_journal_gatewayd_sources = files('''
34 journal-gatewayd.c
35 microhttpd-util.h
36 microhttpd-util.c
37 '''.split())
38
39 if conf.get('ENABLE_REMOTE') ==1 and conf.get('HAVE_LIBCURL') == 1
40 journal_upload_conf = configure_file(
41 input : 'journal-upload.conf.in',
42 output : 'journal-upload.conf',
43 configuration : substs)
44 install_data(journal_upload_conf,
45 install_dir : pkgsysconfdir)
46 endif
47
48 if conf.get('ENABLE_REMOTE') == 1 and conf.get('HAVE_MICROHTTPD') == 1
49 journal_remote_conf = configure_file(
50 input : 'journal-remote.conf.in',
51 output : 'journal-remote.conf',
52 configuration : substs)
53 install_data(journal_remote_conf,
54 install_dir : pkgsysconfdir)
55
56 install_data('browse.html',
57 install_dir : join_paths(pkgdatadir, 'gatewayd'))
58
59 meson.add_install_script('sh', '-c',
60 mkdir_p.format('/var/log/journal/remote'))
61 meson.add_install_script('sh', '-c',
62 '''chown 0:0 $DESTDIR/var/log/journal/remote &&
63 chmod 755 $DESTDIR/var/log/journal/remote || :''')
64 endif