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