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', ''],
13 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
16 foreach pair : tmpfiles
17 if not enable_tmpfiles
19 elif pair[1] == '' or conf.get(pair[1]) == 1
20 install_data(pair[0], install_dir : tmpfilesdir)
22 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
23 .format(pair[0], pair[1], conf.get(pair[1], 0)))
27 m4_files = [['etc.conf', ''],
32 foreach pair : m4_files
33 if not enable_tmpfiles
35 elif pair[1] == '' or conf.get(pair[1]) == 1
37 'tmpfiles.d_' + pair[0],
38 input : pair[0] + '.m4',
40 command : [m4, '-P'] + m4_defines + ['@INPUT@'],
43 install_dir : tmpfilesdir)
45 message('Not installing tmpfiles.d/@0@.m4 because @1@ is @2@'
46 .format(pair[0], pair[1], conf.get(pair[1], 0)))
51 meson.add_install_script(
53 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))