1 # SPDX-License-Identifier: LGPL-2.1+
3 enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
5 tmpfiles = [['home.conf', ''],
6 ['journal-nocow.conf', ''],
7 ['systemd-nologin.conf', ''],
8 ['systemd-nspawn.conf', 'ENABLE_MACHINED'],
9 ['portables.conf', 'ENABLE_PORTABLED'],
12 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
15 foreach pair : tmpfiles
16 if not enable_tmpfiles
18 elif pair[1] == '' or conf.get(pair[1]) == 1
19 install_data(pair[0], install_dir : tmpfilesdir)
21 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
22 .format(pair[0], pair[1], conf.get(pair[1], 0)))
26 m4_files = [['etc.conf', ''],
31 foreach pair : m4_files
32 if not enable_tmpfiles
34 elif pair[1] == '' or conf.get(pair[1]) == 1
36 'tmpfiles.d_' + pair[0],
37 input : pair[0] + '.m4',
39 command : [meson_apply_m4, config_h, '@INPUT@'],
42 install_dir : tmpfilesdir)
44 message('Not installing tmpfiles.d/@0@.m4 because @1@ is @2@'
45 .format(pair[0], pair[1], conf.get(pair[1], 0)))
50 meson.add_install_script(
52 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))