From: Pavel Hrdina Date: Mon, 27 Jul 2020 09:08:41 +0000 (+0200) Subject: meson: src/access: generate org.libvirt.api.policy X-Git-Tag: v6.7.0-rc1~372 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85c11323b1fdb7b5c9be99b68f05ce6cff012f01;p=thirdparty%2Flibvirt.git meson: src/access: generate org.libvirt.api.policy Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa Reviewed-by: Neal Gompa --- diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am index 4060035ec7..7b311f1e6e 100644 --- a/src/access/Makefile.inc.am +++ b/src/access/Makefile.inc.am @@ -6,23 +6,6 @@ ACCESS_DRIVER_API_FILES = \ libvirt_access_lxc.xml \ $(NULL) -ACCESS_DRIVER_POLKIT_POLICY = access/org.libvirt.api.policy - -$(ACCESS_DRIVER_POLKIT_POLICY): $(srcdir)/access/viraccessperm.h \ - $(top_srcdir)/scripts/genpolkit.py Makefile.am - $(AM_V_GEN)$(RUNUTF8) $(PYTHON) \ - $(top_srcdir)/scripts/genpolkit.py $< > $@ || rm -f $@ - -if WITH_POLKIT - -polkitactiondir = $(datadir)/polkit-1/actions -if WITH_LIBVIRTD -polkitaction_DATA = $(ACCESS_DRIVER_POLKIT_POLICY) -endif WITH_LIBVIRTD - -BUILT_SOURCES += $(ACCESS_DRIVER_POLKIT_POLICY) -endif WITH_POLKIT - BUILT_SOURCES += \ $(ACCESS_DRIVER_API_FILES) \ $(NULL) diff --git a/src/access/meson.build b/src/access/meson.build index f3b605f000..52493dccbd 100644 --- a/src/access/meson.build +++ b/src/access/meson.build @@ -9,6 +9,8 @@ access_polkit_sources = [ 'viraccessdriverpolkit.c', ] +access_perm_h = files('viraccessperm.h') + remote_path = meson.source_root() / 'src' / 'remote' access_gen_headers = [] @@ -58,6 +60,18 @@ endforeach if conf.has('WITH_POLKIT') access_sources += access_polkit_sources + + if conf.has('WITH_LIBVIRTD') + custom_target( + 'org.libvirt.api.policy', + input: access_perm_h, + output: 'org.libvirt.api.policy', + command: [ meson_python_prog, python3_prog.path(), genpolkit_prog.path(), '@INPUT@' ], + capture: true, + install: true, + install_dir: datadir / 'polkit-1' / 'actions', + ) + endif endif virt_access_lib = static_library(