diff --git a/tools/Makefile.am b/tools/Makefile.am index 985b1576c4..584ad8d06e 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -26,19 +26,10 @@ conf_DATA = libexec_SCRIPTS = libvirt-guests.sh -if WITH_SANLOCK -sbin_SCRIPTS = virt-sanlock-cleanup -endif WITH_SANLOCK - if WITH_LOGIN_SHELL conf_DATA += virt-login-shell.conf endif WITH_LOGIN_SHELL -virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile - $(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|' \ - -e 's|[@]localstatedir@|$(localstatedir)|' < $< > $@ \ - || (rm $@ && exit 1) && chmod +x $@ - noinst_LTLIBRARIES = BUILT_SOURCES = diff --git a/tools/meson.build b/tools/meson.build index 3f98a3e070..77a6de2f53 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -222,6 +222,7 @@ executable( tools_conf = configuration_data() tools_conf.set('VERSION', meson.project_version()) +tools_conf.set('localstatedir', localstatedir) tools_conf.set('schemadir', pkgdatadir / 'schemas') tools_conf.set('sysconfdir', sysconfdir) @@ -242,3 +243,14 @@ configure_file( install_dir: bindir, install_mode: 'rwxrwxr-x', ) + +if conf.has('WITH_SANLOCK') + configure_file( + input: 'virt-sanlock-cleanup.in', + output: 'virt-sanlock-cleanup', + configuration: tools_conf, + install: true, + install_dir: sbindir, + install_mode: 'rwxrwxr-x', + ) +endif