Debian Codegraph @

src/ssh-generator/meson.build

raw
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 executables += [
4 generator_template + {
5 'name' : 'systemd-ssh-generator',
6 'sources' : files('ssh-generator.c'),
7 'extract' : files('ssh-util.c'),
8 },
9 libexec_template + {
10 'name' : 'systemd-ssh-proxy',
11 'sources' : files('ssh-proxy.c'),
12 },
13 libexec_template + {
14 'name' : 'systemd-ssh-issue',
15 'sources' : files('ssh-issue.c'),
16 'objects' : ['systemd-ssh-generator'],
17 },
18 ]
19
20 if conf.get('ENABLE_SSH_PROXY_CONFIG') == 1
21 custom_target(
22 input : '20-systemd-ssh-proxy.conf.in',
23 output : '20-systemd-ssh-proxy.conf',
24 command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
25 install : true,
26 install_dir : sshconfdir.startswith('/usr/') ? sshconfdir : libexecdir / 'ssh_config.d')
27
28 if (not sshconfdir.startswith(sysconfdir) or install_sysconfdir) and conf.get('LINK_SSH_PROXY_DROPIN') == 1
29 if meson.version().version_compare('>=1.3.0')
30 install_symlink(
31 '20-systemd-ssh-proxy.conf',
32 pointing_to : fs.relative_to(libexecdir / 'ssh_config.d' / '20-systemd-ssh-proxy.conf',
33 sshconfdir),
34 install_dir : sshconfdir)
35 else
36 install_emptydir(sshconfdir)
37
38 meson.add_install_script(sh, '-c',
39 ln_s.format(libexecdir / 'ssh_config.d' / '20-systemd-ssh-proxy.conf',
40 sshconfdir / '20-systemd-ssh-proxy.conf'))
41 endif
42 endif
43 endif