]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: correctly handle "no" value for sshd?confdir options
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 22 Jan 2024 16:11:14 +0000 (17:11 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 22 Jan 2024 22:01:39 +0000 (22:01 +0000)
src/ssh-generator/meson.build
src/userdb/meson.build

index 70a706f2aa8de647e1c08f9ade62897e17d4e512..4cc64647ed75f27e10f7408ad5f38ee5dd89999e 100644 (file)
@@ -11,15 +11,17 @@ executables += [
         },
 ]
 
-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 : libexecdir / 'ssh_config.d')
+if sshconfdir != 'no'
+        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 : libexecdir / 'ssh_config.d')
 
-install_emptydir(sshconfdir)
+        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'))
+        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
index 260dbab2c8539d606b832bff1de0ca250c24ee56..2ee366dbaee29ceb640a75938e2e52d72e043caa 100644 (file)
@@ -24,15 +24,17 @@ executables += [
         },
 ]
 
-custom_target(
-        '20-systemd-userdb.conf',
-        input : '20-systemd-userdb.conf.in',
-        output : '20-systemd-userdb.conf',
-        command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
-        install : conf.get('ENABLE_USERDB') == 1 and sshdconfdir != 'no',
-        install_dir : libexecdir / 'sshd_config.d')
+if conf.get('ENABLE_USERDB') == 1 and sshdconfdir != 'no'
+        custom_target(
+                '20-systemd-userdb.conf',
+                input : '20-systemd-userdb.conf.in',
+                output : '20-systemd-userdb.conf',
+                command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
+                install : true,
+                install_dir : libexecdir / 'sshd_config.d')
 
-install_emptydir(sshdconfdir)
+        install_emptydir(sshdconfdir)
 
-meson.add_install_script(sh, '-c',
-        ln_s.format(libexecdir / 'sshd_config.d' / '20-systemd-userdb.conf', sshdconfdir / '20-systemd-userdb.conf'))
+        meson.add_install_script(sh, '-c',
+                ln_s.format(libexecdir / 'sshd_config.d' / '20-systemd-userdb.conf', sshdconfdir / '20-systemd-userdb.conf'))
+endif