]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | # SPDX-License-Identifier: LGPL-2.1-or-later |
3a726fcd | 2 | |
349cc4a5 | 3 | enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1 |
5c23128d | 4 | |
d83e90c7 ZJS |
5 | files = [['README', ''], |
6 | ['home.conf', ''], | |
7 | ['journal-nocow.conf', ''], | |
8 | ['systemd-nologin.conf', 'HAVE_PAM'], | |
9 | ['systemd-nspawn.conf', 'ENABLE_MACHINED'], | |
b15f6eae | 10 | ['systemd-resolve.conf', 'ENABLE_RESOLVE'], |
d83e90c7 ZJS |
11 | ['systemd-tmp.conf', ''], |
12 | ['portables.conf', 'ENABLE_PORTABLED'], | |
13 | ['systemd-pstore.conf', 'ENABLE_PSTORE'], | |
14 | ['tmp.conf', ''], | |
15 | ['x11.conf', ''], | |
d83e90c7 | 16 | ] |
5c23128d | 17 | |
d83e90c7 | 18 | foreach pair : files |
37efbbd8 ZJS |
19 | if not enable_tmpfiles |
20 | # do nothing | |
349cc4a5 | 21 | elif pair[1] == '' or conf.get(pair[1]) == 1 |
37efbbd8 ZJS |
22 | install_data(pair[0], install_dir : tmpfilesdir) |
23 | else | |
24 | message('Not installing tmpfiles.d/@0@ because @1@ is @2@' | |
25 | .format(pair[0], pair[1], conf.get(pair[1], 0))) | |
26 | endif | |
5c23128d ZJS |
27 | endforeach |
28 | ||
6fe23ff3 LB |
29 | in_files = [['etc.conf', ''], |
30 | ['legacy.conf', 'HAVE_SYSV_COMPAT'], | |
31 | ['static-nodes-permissions.conf', ''], | |
32 | ['systemd.conf', ''], | |
33 | ['var.conf', ''], | |
34 | ] | |
1f9290fc | 35 | |
6fe23ff3 LB |
36 | foreach pair : in_files |
37 | if not enable_tmpfiles | |
38 | # do nothing | |
39 | elif pair[1] == '' or conf.get(pair[1]) == 1 | |
40 | custom_target( | |
9247df5a | 41 | pair[0], |
6fe23ff3 LB |
42 | input : pair[0] + '.in', |
43 | output: pair[0], | |
8f04a1ca | 44 | command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], |
6fe23ff3 LB |
45 | install : enable_tmpfiles, |
46 | install_dir : tmpfilesdir) | |
47 | else | |
48 | message('Not installing tmpfiles.d/@0@ because @1@ is @2@' | |
49 | .format(pair[0], pair[1], conf.get(pair[1], 0))) | |
50 | endif | |
5c23128d | 51 | endforeach |
94e75a54 | 52 | |
d7aa78c3 | 53 | if enable_tmpfiles and install_sysconfdir |
37efbbd8 | 54 | meson.add_install_script( |
fce9abb2 | 55 | 'sh', '-c', mkdir_p.format(sysconfdir / 'tmpfiles.d')) |
94e75a54 | 56 | endif |