]> git.ipfire.org Git - thirdparty/systemd.git/blame - tmpfiles.d/meson.build
Merge pull request #13944 from yuwata/network-split-struct-prefix
[thirdparty/systemd.git] / tmpfiles.d / meson.build
CommitLineData
3a726fcd 1# SPDX-License-Identifier: LGPL-2.1+
3a726fcd 2
349cc4a5 3enable_tmpfiles = conf.get('ENABLE_TMPFILES') == 1
5c23128d
ZJS
4
5tmpfiles = [['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
16foreach 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
25endforeach
26
1f9290fc 27in_files = ['static-nodes-permissions.conf']
5c23128d 28
1f9290fc
ZJS
29foreach 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
38endforeach
39
40m4_files = ['etc.conf',
41 'systemd.conf',
42 'var.conf']
43
44foreach 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 55endforeach
94e75a54
ZJS
56
57if enable_tmpfiles
37efbbd8
ZJS
58 meson.add_install_script(
59 'sh', '-c',
60 mkdir_p.format(join_paths(sysconfdir, 'tmpfiles.d')))
94e75a54 61endif