diff --git a/meson.build b/meson.build index a7d5ea9ea3..4356c95a19 100644 --- a/meson.build +++ b/meson.build @@ -43,10 +43,18 @@ nm_libexecdir = join_paths(nm_prefix, get_option('libexecdir')) nm_localedir = join_paths(nm_prefix, get_option('localedir')) nm_localstatedir = join_paths(nm_prefix, get_option('localstatedir')) nm_mandir = join_paths(nm_prefix, get_option('mandir')) -nm_runstatedir = join_paths(nm_localstatedir, 'run') nm_sbindir = join_paths(nm_prefix, get_option('sbindir')) nm_sysconfdir = join_paths(nm_prefix, get_option('sysconfdir')) +nm_runstatedir = get_option('runtime_dir') +if nm_runstatedir == '' + if get_option('prefix') == '/usr' + nm_runstatedir = '/run' + else + nm_runstatedir = join_paths(nm_localstatedir, 'run') + endif +endif + nm_pkgsbindir = join_paths(nm_sbindir, nm_name) nm_pkgconfdir = join_paths(nm_sysconfdir, nm_name) nm_pkgdatadir = join_paths(nm_datadir, nm_name) diff --git a/meson_options.txt b/meson_options.txt index 92439ac539..75cf183d71 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -4,6 +4,7 @@ option('system_ca_path', type: 'string', value: '/etc/ssl/certs', description: ' option('udev_dir', type: 'string', value: '', description: 'Absolute path of the udev base directory. Set to \'no\' not to install the udev rule') option('dbus_conf_dir', type: 'string', value: '', description: 'where D-Bus system.d directory is') option('kernel_firmware_dir', type: 'string', value: '/lib/firmware', description: 'where kernel firmware directory is (default is /lib/firmware)') +option('runtime_dir', type: 'string', value: '', description: 'Directory for transient runtime state [default: LOCALSTATEDIR/run or /run]') option('iptables', type: 'string', value: '', description: 'path to iptables') option('nft', type: 'string', value: '', description: 'path to nft') option('dnsmasq', type: 'string', value: '', description: 'path to dnsmasq')