]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/journal/meson.build
journalctl: make pcre2 a dlopen() dependency
[thirdparty/systemd.git] / src / journal / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 journal_client_sources = files('''
4 audit-type.c
5 audit-type.h
6 catalog.c
7 catalog.h
8 compress.c
9 compress.h
10 journal-def.h
11 journal-file.c
12 journal-file.h
13 journal-send.c
14 journal-vacuum.c
15 journal-vacuum.h
16 journal-verify.c
17 journal-verify.h
18 lookup3.c
19 lookup3.h
20 mmap-cache.c
21 mmap-cache.h
22 sd-journal.c
23 '''.split())
24
25 if conf.get('HAVE_GCRYPT') == 1
26 journal_client_sources += files('''
27 journal-authenticate.c
28 journal-authenticate.h
29 fsprg.c
30 fsprg.h
31 '''.split())
32 endif
33
34 ############################################################
35
36 audit_type_includes = [config_h,
37 missing_audit_h,
38 'linux/audit.h']
39 if conf.get('HAVE_AUDIT') == 1
40 audit_type_includes += 'libaudit.h'
41 endif
42
43 generate_audit_type_list = find_program('generate-audit_type-list.sh')
44 audit_type_list_txt = custom_target(
45 'audit_type-list.txt',
46 output : 'audit_type-list.txt',
47 command : [generate_audit_type_list, cpp] + audit_type_includes,
48 capture : true)
49
50 audit_type_to_name = custom_target(
51 'audit_type-to-name.h',
52 input : ['audit_type-to-name.awk', audit_type_list_txt],
53 output : 'audit_type-to-name.h',
54 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
55 capture : true)
56
57 journal_client_sources += [audit_type_to_name]
58
59 libjournal_client = static_library(
60 'journal-client',
61 journal_client_sources,
62 include_directories : includes,
63 c_args : ['-fvisibility=default'])
64
65 ############################################################
66
67 libjournal_core_sources = files('''
68 journald-audit.c
69 journald-audit.h
70 journald-console.c
71 journald-console.h
72 journald-context.c
73 journald-context.h
74 journald-kmsg.c
75 journald-kmsg.h
76 journald-native.c
77 journald-native.h
78 journald-rate-limit.c
79 journald-rate-limit.h
80 journald-server.c
81 journald-server.h
82 journald-stream.c
83 journald-stream.h
84 journald-syslog.c
85 journald-syslog.h
86 journald-wall.c
87 journald-wall.h
88 journal-internal.h
89 '''.split())
90
91 systemd_journald_sources = files('''
92 journald.c
93 journald-server.h
94 '''.split())
95
96 journald_gperf_c = custom_target(
97 'journald-gperf.c',
98 input : 'journald-gperf.gperf',
99 output : 'journald-gperf.c',
100 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
101
102 systemd_cat_sources = files('cat.c')
103
104 journalctl_sources = files('''
105 journalctl.c
106 pcre2-dlopen.c
107 pcre2-dlopen.h
108 '''.split())
109
110 if conf.get('HAVE_QRENCODE') == 1
111 journalctl_sources += files('journal-qrcode.c',
112 'journal-qrcode.h')
113 endif
114
115 install_data('journald.conf',
116 install_dir : pkgsysconfdir)
117
118 if get_option('create-log-dirs')
119 meson.add_install_script(
120 'sh', '-c',
121 mkdir_p.format('/var/log/journal'))
122 meson.add_install_script(
123 'sh', '-c',
124 '''chown 0:0 $DESTDIR/var/log/journal &&
125 chmod 755 $DESTDIR/var/log/journal || :''')
126 if get_option('adm-group')
127 meson.add_install_script(
128 'sh', '-c',
129 'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
130 endif
131 if get_option('wheel-group')
132 meson.add_install_script(
133 'sh', '-c',
134 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')
135 endif
136 endif