meson: tools: generate virt-xml-validate script

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:
Pavel Hrdina 2020-06-18 01:47:11 +02:00
parent c6592f0d8c
commit f6c14d4c1f
2 changed files with 14 additions and 6 deletions

View File

@ -24,7 +24,7 @@ STANDALONE_CPPFLAGS = -I$(top_srcdir)
confdir = $(sysconfdir)/libvirt
conf_DATA =
bin_SCRIPTS = virt-xml-validate virt-pki-validate
bin_SCRIPTS = virt-pki-validate
libexec_SCRIPTS = libvirt-guests.sh
if WITH_SANLOCK
@ -35,11 +35,6 @@ if WITH_LOGIN_SHELL
conf_DATA += virt-login-shell.conf
endif WITH_LOGIN_SHELL
virt-xml-validate: virt-xml-validate.in Makefile
$(AM_V_GEN)sed -e 's|[@]schemadir@|$(pkgdatadir)/schemas|g' \
-e 's|[@]VERSION@|$(VERSION)|g' \
< $< > $@ || (rm $@ && exit 1) && chmod +x $@
virt-pki-validate: virt-pki-validate.in Makefile
$(AM_V_GEN)sed -e 's|[@]sysconfdir@|$(sysconfdir)|g' \
-e 's|[@]VERSION@|$(VERSION)|g' \

View File

@ -219,3 +219,16 @@ executable(
install_dir: bindir,
install_rpath: libdir,
)
tools_conf = configuration_data()
tools_conf.set('VERSION', meson.project_version())
tools_conf.set('schemadir', pkgdatadir / 'schemas')
configure_file(
input: 'virt-xml-validate.in',
output: 'virt-xml-validate',
configuration: tools_conf,
install: true,
install_dir: bindir,
install_mode: 'rwxrwxr-x',
)