1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright © 2017 Zbigniew Jędrzejewski-Szmek
5 enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
7 tmpfiles = [['home.conf', ''],
8 ['journal-nocow.conf', ''],
9 ['systemd-nologin.conf', ''],
10 ['systemd-nspawn.conf', 'ENABLE_MACHINED'],
11 ['portables.conf', 'ENABLE_PORTABLED'],
14 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
17 foreach pair : tmpfiles
18 if not enable_tmpfiles
20 elif pair[1] == '' or conf.get(pair[1]) == 1
21 install_data(pair[0], install_dir : tmpfilesdir)
23 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
24 .format(pair[0], pair[1], conf.get(pair[1], 0)))
28 m4_files = [['etc.conf', ''],
33 foreach pair : m4_files
34 if not enable_tmpfiles
36 elif pair[1] == '' or conf.get(pair[1]) == 1
38 'tmpfiles.d_' + pair[0],
39 input : pair[0] + '.m4',
41 command : [meson_apply_m4, config_h, '@INPUT@'],
44 install_dir : tmpfilesdir)
46 message('Not installing tmpfiles.d/@0@.m4 because @1@ is @2@'
47 .format(pair[0], pair[1], conf.get(pair[1], 0)))
52 meson.add_install_script(
54 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))