[libvirt PATCH 231/351] meson: src/access: generate org.libvirt.api.policy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/access/Makefile.inc.am | 15 ---------------
 src/access/meson.build     | 14 ++++++++++++++
 2 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/src/access/Makefile.inc.am b/src/access/Makefile.inc.am
index 72c62a0d2cd..d90829632ff 100644
--- a/src/access/Makefile.inc.am
+++ b/src/access/Makefile.inc.am
@@ -6,21 +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
-endif ! WITH_POLKIT
-
 libvirt_access.xml: $(srcdir)/rpc/gendispatch.pl \
 			$(REMOTE_PROTOCOL) Makefile.am
 	$(AM_V_GEN)$(PERL) -w $(srcdir)/rpc/gendispatch.pl --mode=aclapi \
diff --git a/src/access/meson.build b/src/access/meson.build
index f3b605f0009..71bc4670091 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, genpolkit_prog, '@INPUT@' ],
+      capture: true,
+      install: true,
+      install_dir: datadir / 'polkit-1' / 'actions',
+    )
+  endif
 endif
 
 virt_access_lib = static_library(
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux