]> git.ipfire.org Git - thirdparty/systemd.git/blob - tmpfiles.d/meson.build
hwdb: Allow console users access to media* nodes
[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 ['systemd-nologin.conf', 'HAVE_PAM'],
9 ['systemd-nspawn.conf', 'ENABLE_MACHINED'],
10 ['systemd-tmp.conf', ''],
11 ['portables.conf', 'ENABLE_PORTABLED'],
12 ['systemd-pstore.conf', 'ENABLE_PSTORE'],
13 ['tmp.conf', ''],
14 ['x11.conf', ''],
15 ]
16
17 foreach pair : files
18 if not enable_tmpfiles
19 # do nothing
20 elif pair[1] == '' or conf.get(pair[1]) == 1
21 install_data(pair[0], install_dir : tmpfilesdir)
22 else
23 message('Not installing tmpfiles.d/@0@ because @1@ is @2@'
24 .format(pair[0], pair[1], conf.get(pair[1], 0)))
25 endif
26 endforeach
27
28 in_files = [['etc.conf', ''],
29 ['legacy.conf', 'HAVE_SYSV_COMPAT'],
30 ['static-nodes-permissions.conf', ''],
31 ['systemd.conf', ''],
32 ['var.conf', ''],
33 ]
34
35 foreach pair : in_files
36 if not enable_tmpfiles
37 # do nothing
38 elif pair[1] == '' or conf.get(pair[1]) == 1
39 custom_target(
40 pair[0],
41 input : pair[0] + '.in',
42 output: pair[0],
43 command : [meson_render_jinja2, config_h, '@INPUT@'],
44 capture : true,
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
51 endforeach
52
53 if enable_tmpfiles and install_sysconfdir
54 meson.add_install_script(
55 'sh', '-c', mkdir_p.format(sysconfdir / 'tmpfiles.d'))
56 endif