]>
Commit | Line | Data |
---|---|---|
3a726fcd | 1 | # SPDX-License-Identifier: LGPL-2.1+ |
3a726fcd | 2 | |
349cc4a5 | 3 | enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1 |
5c23128d ZJS |
4 | |
5 | tmpfiles = [['home.conf', ''], | |
6 | ['journal-nocow.conf', ''], | |
a45ef507 | 7 | ['systemd-nologin.conf', 'HAVE_PAM'], |
32b8157f | 8 | ['systemd-nspawn.conf', 'ENABLE_MACHINED'], |
63f28cad | 9 | ['systemd-tmp.conf', ''], |
61d0578b | 10 | ['portables.conf', 'ENABLE_PORTABLED'], |
5c23128d | 11 | ['tmp.conf', ''], |
5c23128d ZJS |
12 | ['x11.conf', ''], |
13 | ['legacy.conf', 'HAVE_SYSV_COMPAT'], | |
14 | ] | |
15 | ||
16 | foreach pair : tmpfiles | |
37efbbd8 ZJS |
17 | if not enable_tmpfiles |
18 | # do nothing | |
349cc4a5 | 19 | elif pair[1] == '' or conf.get(pair[1]) == 1 |
37efbbd8 ZJS |
20 | install_data(pair[0], install_dir : tmpfilesdir) |
21 | else | |
22 | message('Not installing tmpfiles.d/@0@ because @1@ is @2@' | |
23 | .format(pair[0], pair[1], conf.get(pair[1], 0))) | |
24 | endif | |
5c23128d ZJS |
25 | endforeach |
26 | ||
1f9290fc | 27 | in_files = ['static-nodes-permissions.conf'] |
5c23128d | 28 | |
1f9290fc ZJS |
29 | foreach file : in_files |
30 | gen = configure_file( | |
31 | input : file + '.in', | |
32 | output : file, | |
33 | configuration : substs) | |
34 | if enable_tmpfiles | |
35 | install_data(gen, | |
36 | install_dir : tmpfilesdir) | |
37 | endif | |
38 | endforeach | |
39 | ||
40 | m4_files = ['etc.conf', | |
41 | 'systemd.conf', | |
42 | 'var.conf'] | |
43 | ||
44 | foreach file : m4_files | |
45 | if enable_tmpfiles | |
5e354b22 | 46 | custom_target( |
1f9290fc ZJS |
47 | 'tmpfiles.d_' + file, |
48 | input : file + '.m4', | |
49 | output: file, | |
348b4437 | 50 | command : [meson_apply_m4, config_h, '@INPUT@'], |
5e354b22 FB |
51 | capture : true, |
52 | install : true, | |
53 | install_dir : tmpfilesdir) | |
5e354b22 | 54 | endif |
5c23128d | 55 | endforeach |
94e75a54 ZJS |
56 | |
57 | if enable_tmpfiles | |
37efbbd8 ZJS |
58 | meson.add_install_script( |
59 | 'sh', '-c', | |
60 | mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d'))) | |
94e75a54 | 61 | endif |