]> git.ipfire.org Git - thirdparty/systemd.git/blob - tmpfiles.d/meson.build
Merge pull request #30968 from poettering/per-user-creds
[thirdparty/systemd.git] / tmpfiles.d / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
4
5 files = [['README', ''],
6 ['home.conf', ''],
7 ['journal-nocow.conf', ''],
8 ['portables.conf', 'ENABLE_PORTABLED'],
9 ['systemd-network.conf', 'ENABLE_NETWORKD'],
10 ['systemd-nologin.conf', 'HAVE_PAM'],
11 ['systemd-nspawn.conf', 'ENABLE_MACHINED'],
12 ['systemd-pstore.conf', 'ENABLE_PSTORE'],
13 ['systemd-resolve.conf', 'ENABLE_RESOLVE'],
14 ['systemd-tmp.conf', ''],
15 ['tmp.conf', ''],
16 ['x11.conf', ''],
17 ['provision.conf', ''],
18 ['credstore.conf', ''],
19 ]
20
21 foreach pair : files
22 if not enable_tmpfiles
23 # do nothing
24 elif pair[1] == '' or conf.get(pair[1]) == 1
25 install_data(pair[0], install_dir : tmpfilesdir)
26 else
27 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
28 .format(pair[0], pair[1], conf.get(pair[1], 0)))
29 endif
30 endforeach
31
32 in_files = [['etc.conf', ''],
33 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
34 ['static-nodes-permissions.conf', ''],
35 ['systemd.conf', ''],
36 ['var.conf', ''],
37 ['20-systemd-userdb.conf', 'ENABLE_SSH_USERDB_CONFIG'],
38 ['20-systemd-ssh-generator.conf', 'ENABLE_SSH_PROXY_CONFIG'],
39 ]
40
41 foreach pair : in_files
42 if not enable_tmpfiles
43 # do nothing
44 elif pair[1] == '' or conf.get(pair[1]) == 1
45 custom_target(
46 pair[0],
47 input : pair[0] + '.in',
48 output: pair[0],
49 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
50 install : enable_tmpfiles,
51 install_dir : tmpfilesdir)
52 else
53 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
54 .format(pair[0], pair[1], conf.get(pair[1], 0)))
55 endif
56 endforeach
57
58 if enable_tmpfiles and install_sysconfdir
59 install_emptydir(sysconfdir / 'tmpfiles.d')
60 endif