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)
'viraccessdriverpolkit.c',
]
+access_perm_h = files('viraccessperm.h')
+
remote_path = meson.source_root() / 'src' / 'remote'
access_gen_headers = []
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(