Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- tools/Makefile.am | 34 ++-------------------------------- tools/meson.build | 9 +++++++++ 2 files changed, 11 insertions(+), 32 deletions(-) diff --git a/tools/Makefile.am b/tools/Makefile.am index 9c6c6b3d3c9..ba3b0bbc120 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -23,42 +23,12 @@ STANDALONE_CPPFLAGS = -I$(top_srcdir) noinst_LTLIBRARIES = -install-data-local: install-systemd install-nss \ +install-data-local: install-nss \ install-bash-completion -uninstall-local: uninstall-systemd uninstall-nss \ +uninstall-local: uninstall-nss \ uninstall-bash-completion -SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system - -if LIBVIRT_INIT_SCRIPT_SYSTEMD -install-systemd: libvirt-guests.service libvirt-guests.sh - $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR) - $(INSTALL_DATA) libvirt-guests.service \ - $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - -uninstall-systemd: - rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service - rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||: - -else ! LIBVIRT_INIT_SCRIPT_SYSTEMD -install-systemd: -uninstall-systemd: -endif ! LIBVIRT_INIT_SCRIPT_SYSTEMD - -libvirt-guests.service: libvirt-guests.service.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' \ - -e 's|[@]libexecdir[@]|$(libexecdir)|g' \ - < $< > $@-t && \ - mv $@-t $@ - - if WITH_BASH_COMPLETION install-bash-completion: $(MKDIR_P) "$(DESTDIR)$(BASH_COMPLETIONS_DIR)" diff --git a/tools/meson.build b/tools/meson.build index b95ced3728b..ce8f2bdd1e3 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -222,6 +222,7 @@ 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('libexecdir', libexecdir) tools_conf.set('localedir', localedir) tools_conf.set('localstatedir', localstatedir) tools_conf.set('sbindir', sbindir) @@ -268,4 +269,12 @@ if init_script == 'systemd' install_dir: sysconfdir / 'sysconfig', rename: 'libvirt-guests', ) + + configure_file( + input: 'libvirt-guests.service.in', + output: 'libvirt-guests.service', + configuration: tools_conf, + install: true, + install_dir: prefix / 'lib' / 'systemd' / 'system', + ) endif -- 2.26.2