Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
tools/Makefile.am | 14 --------------
tools/meson.build | 12 ++++++++++++
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 94ea385354e..39bc7349a88 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -24,8 +24,6 @@ STANDALONE_CPPFLAGS = -I$(top_srcdir)
confdir = $(sysconfdir)/libvirt
conf_DATA =
-libexec_SCRIPTS = libvirt-guests.sh
-
if WITH_LOGIN_SHELL
conf_DATA += virt-login-shell.conf
endif WITH_LOGIN_SHELL
@@ -47,18 +45,6 @@ uninstall-sysconfig:
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
-libvirt-guests.sh: libvirt-guests.sh.in $(top_builddir)/config.status
- $(AM_V_GEN)sed \
- -e 's|[@]PACKAGE[@]|$(PACKAGE)|g' \
- -e 's|[@]bindir[@]|$(bindir)|g' \
- -e 's|[@]localedir[@]|$(localedir)|g' \
- -e 's|[@]localstatedir[@]|$(localstatedir)|g' \
- -e 's|[@]sbindir[@]|$(sbindir)|g' \
- -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
- < $< > $@-t && \
- chmod a+x $@-t && \
- mv $@-t $@
-
SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system
if LIBVIRT_INIT_SCRIPT_SYSTEMD
diff --git a/tools/meson.build b/tools/meson.build
index d114c109ea6..ad83dd9508b 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -217,8 +217,12 @@ executable(
)
tools_conf = configuration_data()
+tools_conf.set('PACKAGE', meson.project_name())
tools_conf.set('VERSION', meson.project_version())
+tools_conf.set('bindir', bindir)
+tools_conf.set('localedir', localedir)
tools_conf.set('localstatedir', localstatedir)
+tools_conf.set('sbindir', sbindir)
tools_conf.set('schemadir', pkgdatadir / 'schemas')
tools_conf.set('sysconfdir', sysconfdir)
@@ -247,3 +251,11 @@ if conf.has('WITH_SANLOCK')
install_dir: sbindir,
)
endif
+
+configure_file(
+ input: 'libvirt-guests.sh.in',
+ output: 'libvirt-guests.sh',
+ configuration: tools_conf,
+ install: true,
+ install_dir: libexecdir,
+)
--
2.26.2