summaryrefslogtreecommitdiff
path: root/src/journal-remote/meson.build
blob: d266b34e659ebad6eafe4ff635506ee545e8f445 (plain)
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
systemd_journal_upload_sources = files('''
        journal-upload.h
        journal-upload.c
        journal-upload-journal.c
'''.split())

systemd_journal_remote_sources = files('''
        journal-remote-parse.h
        journal-remote-parse.c
        journal-remote-write.h
        journal-remote-write.c
        journal-remote.h
        journal-remote.c
        microhttpd-util.h
        microhttpd-util.c
'''.split())

systemd_journal_gatewayd_sources = files('''
        journal-gatewayd.c
        microhttpd-util.h
        microhttpd-util.c
'''.split())

if conf.get('ENABLE_REMOTE', false) and conf.get('HAVE_LIBCURL', false)
        journal_upload_conf = configure_file(
                input : 'journal-upload.conf.in',
                output : 'journal-upload.conf',
                configuration : substs)
        install_data(journal_upload_conf,
                     install_dir : pkgsysconfdir)
endif

if conf.get('ENABLE_REMOTE', false) and conf.get('HAVE_MICROHTTPD', false)
        journal_remote_conf = configure_file(
                input : 'journal-remote.conf.in',
                output : 'journal-remote.conf',
                configuration : substs)
        install_data(journal_remote_conf,
                     install_dir : pkgsysconfdir)

        install_data('browse.html',
                     install_dir : join_paths(pkgdatadir, 'gatewayd'))

        meson.add_install_script('sh', '-c',
                                 mkdir_p.format('/var/log/journal/remote'))
        meson.add_install_script('sh', '-c',
                                 'chown 0:0 $DESTDIR/var/log/journal/remote &&
                                 chmod 755 $DESTDIR/var/log/journal/remote || :')
endif