mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
meson: tools: generate libvirt-guests.service systemd unit
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
444f2e70e7
commit
5c65e0d9ca
@ -23,46 +23,12 @@ STANDALONE_CPPFLAGS = -I$(top_srcdir)
|
||||
|
||||
noinst_LTLIBRARIES =
|
||||
|
||||
BUILT_SOURCES =
|
||||
|
||||
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) ||:
|
||||
|
||||
BUILT_SOURCES += libvirt-guests.service
|
||||
|
||||
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)"
|
||||
|
@ -226,6 +226,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)
|
||||
@ -276,4 +277,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user