1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
5 # systemd is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
10 # systemd is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
18 journal_client_sources = files('''
40 if conf.get('HAVE_GCRYPT') == 1
41 journal_client_sources += files('''
42 journal-authenticate.c
43 journal-authenticate.h
49 ############################################################
51 audit_type_includes = [config_h,
54 if conf.get('HAVE_AUDIT') == 1
55 audit_type_includes += 'libaudit.h'
58 generate_audit_type_list = find_program('generate-audit_type-list.sh')
59 audit_type_list_txt = custom_target(
60 'audit_type-list.txt',
61 output : 'audit_type-list.txt',
62 command : [generate_audit_type_list, cpp] + audit_type_includes,
65 audit_type_to_name = custom_target(
66 'audit_type-to-name.h',
67 input : ['audit_type-to-name.awk', audit_type_list_txt],
68 output : 'audit_type-to-name.h',
69 command : [awk, '-f', '@INPUT0@', '@INPUT1@'],
72 journal_client_sources += [audit_type_to_name]
74 libjournal_client = static_library(
76 journal_client_sources,
77 include_directories : includes,
78 c_args : ['-fvisibility=default'])
80 ############################################################
82 libjournal_core_sources = files('''
106 systemd_journald_sources = files('''
111 journald_gperf_c = custom_target(
113 input : 'journald-gperf.gperf',
114 output : 'journald-gperf.c',
115 command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
117 systemd_cat_sources = files('cat.c')
119 journalctl_sources = files('journalctl.c')
121 if conf.get('HAVE_QRENCODE') == 1
122 journalctl_sources += files('journal-qrcode.c',
126 install_data('journald.conf',
127 install_dir : pkgsysconfdir)
129 meson.add_install_script(
131 mkdir_p.format('/var/log/journal'))
132 meson.add_install_script(
134 '''chown 0:0 $DESTDIR/var/log/journal &&
135 chmod 755 $DESTDIR/var/log/journal || :''')
136 if get_option('adm-group')
137 meson.add_install_script(
139 'setfacl -nm g:adm:rx,d:g:adm:rx $DESTDIR/var/log/journal || :')
141 if get_option('wheel-group')
142 meson.add_install_script(
144 'setfacl -nm g:wheel:rx,d:g:wheel:rx $DESTDIR/var/log/journal || :')