diff options
Diffstat (limited to 'src/ssh-generator/meson.build')
-rw-r--r-- | src/ssh-generator/meson.build | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ssh-generator/meson.build b/src/ssh-generator/meson.build new file mode 100644 index 0000000..d5413f7 --- /dev/null +++ b/src/ssh-generator/meson.build @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +executables += [ + generator_template + { + 'name' : 'systemd-ssh-generator', + 'sources' : files('ssh-generator.c'), + }, + libexec_template + { + 'name' : 'systemd-ssh-proxy', + 'sources' : files('ssh-proxy.c'), + }, +] + +if conf.get('ENABLE_SSH_PROXY_CONFIG') == 1 + custom_target( + '20-systemd-ssh-proxy.conf', + input : '20-systemd-ssh-proxy.conf.in', + output : '20-systemd-ssh-proxy.conf', + command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'], + install : true, + install_dir : sshconfdir.startswith('/usr/') ? sshconfdir : libexecdir / 'ssh_config.d') + + if not sshconfdir.startswith('/usr/') + install_emptydir(sshconfdir) + + meson.add_install_script(sh, '-c', + ln_s.format(libexecdir / 'ssh_config.d' / '20-systemd-ssh-proxy.conf', sshconfdir / '20-systemd-ssh-proxy.conf')) + endif +endif |