From: Oto Šťáva Date: Fri, 5 Jan 2024 16:54:41 +0000 (+0100) Subject: meson.build: conditional branching on run_dir X-Git-Tag: v6.0.6~9^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b938916003a2f04aede33da6216bf27c7586dc7;p=thirdparty%2Fknot-resolver.git meson.build: conditional branching on run_dir This should, to the best of our knowledge, give us the correct run_dir on Linux, macOS and BSDs. --- diff --git a/meson.build b/meson.build index 5b7b6eddd..e6066e7a0 100644 --- a/meson.build +++ b/meson.build @@ -53,7 +53,13 @@ lib_dir = prefix / get_option('libdir') / 'knot-resolver' modules_dir = lib_dir / 'kres_modules' sbin_dir = prefix / get_option('sbindir') bin_dir = prefix / get_option('bindir') -run_dir = prefix / get_option('localstatedir') / 'run' / 'knot-resolver' +if host_machine.system() == 'linux' + run_dir = '/run' / 'knot-resolver' +elif host_machine.system() == 'darwin' + run_dir = prefix / get_option('localstatedir') / 'run' / 'knot-resolver' +else + run_dir = get_option('localstatedir') / 'run' / 'knot-resolver' +endif systemd_work_dir = prefix / get_option('localstatedir') / 'lib' / 'knot-resolver' systemd_cache_dir = prefix / get_option('localstatedir') / 'cache' / 'knot-resolver' systemd_unit_dir = prefix / 'lib' / 'systemd' / 'system'