[libvirt PATCH 263/351] meson: tools: generate virt-sanlock-cleanup script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 tools/Makefile.am |  9 ---------
 tools/meson.build | 11 +++++++++++
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/tools/Makefile.am b/tools/Makefile.am
index ee7f8b5b1ab..94ea385354e 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 =
 
 install-data-local: install-systemd install-nss \
diff --git a/tools/meson.build b/tools/meson.build
index 50a7267f911..d114c109ea6 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -218,6 +218,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)
 
@@ -236,3 +237,13 @@ configure_file(
   install: true,
   install_dir: bindir,
 )
+
+if conf.has('WITH_SANLOCK')
+  configure_file(
+    input: 'virt-sanlock-cleanup.in',
+    output: 'virt-sanlock-cleanup',
+    configuration: tools_conf,
+    install: true,
+    install_dir: sbindir,
+  )
+endif
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux