]>
Commit | Line | Data |
---|---|---|
2c201c21 | 1 | enable_tmpfiles = conf.get('ENABLE_TMPFILES', false) |
5c23128d ZJS |
2 | |
3 | tmpfiles = [['home.conf', ''], | |
4 | ['journal-nocow.conf', ''], | |
5 | ['systemd-nologin.conf', ''], | |
6 | ['systemd-nspawn.conf', ''], | |
7 | ['systemd-remote.conf', 'ENABLE_REMOTE'], | |
8 | ['tmp.conf', ''], | |
9 | ['var.conf', ''], | |
10 | ['x11.conf', ''], | |
11 | ['legacy.conf', 'HAVE_SYSV_COMPAT'], | |
12 | ] | |
13 | ||
14 | foreach pair : tmpfiles | |
37efbbd8 ZJS |
15 | if not enable_tmpfiles |
16 | # do nothing | |
2c201c21 | 17 | elif pair[1] == '' or conf.get(pair[1], false) |
37efbbd8 ZJS |
18 | install_data(pair[0], install_dir : tmpfilesdir) |
19 | else | |
20 | message('Not installing tmpfiles.d/@0@ because @1@ is @2@' | |
21 | .format(pair[0], pair[1], conf.get(pair[1], 0))) | |
22 | endif | |
5c23128d ZJS |
23 | endforeach |
24 | ||
25 | m4_files = ['etc.conf', | |
26 | 'systemd.conf'] | |
27 | ||
28 | foreach file : m4_files | |
37efbbd8 ZJS |
29 | custom_target( |
30 | 'tmpfiles.d/' + file, | |
31 | input : file + '.m4', | |
32 | output: file, | |
33 | command : [m4, '-P'] + m4_defines + ['@INPUT@'], | |
34 | capture : true, | |
35 | install : enable_tmpfiles, | |
36 | install_dir : tmpfilesdir) | |
5c23128d | 37 | endforeach |
94e75a54 ZJS |
38 | |
39 | if enable_tmpfiles | |
37efbbd8 ZJS |
40 | meson.add_install_script( |
41 | 'sh', '-c', | |
42 | mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d'))) | |
94e75a54 | 43 | endif |