diff --git a/src/remote/Makefile.inc.am b/src/remote/Makefile.inc.am index f80f4a0632..6a4af4aad3 100644 --- a/src/remote/Makefile.inc.am +++ b/src/remote/Makefile.inc.am @@ -1,32 +1,5 @@ # vim: filetype=automake -if WITH_LIBVIRTD - -if WITH_POLKIT -polkitdir = $(datadir)/polkit-1 -polkitactionsdir = $(polkitdir)/actions -polkitrulesdir = $(polkitdir)/rules.d - -install-polkit: - $(MKDIR_P) $(DESTDIR)$(polkitactionsdir) - $(INSTALL_DATA) $(srcdir)/remote/libvirtd.policy \ - $(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy - $(MKDIR_P) $(DESTDIR)$(polkitrulesdir) - $(INSTALL_DATA) $(srcdir)/remote/libvirtd.rules \ - $(DESTDIR)$(polkitrulesdir)/50-libvirt.rules - -uninstall-polkit: - rm -f $(DESTDIR)$(polkitactionsdir)/org.libvirt.unix.policy - rmdir $(DESTDIR)$(polkitactionsdir) || : - rm -f $(DESTDIR)$(polkitrulesdir)/50-libvirt.rules - rmdir $(DESTDIR)$(polkitrulesdir) || : - -INSTALL_DATA_LOCAL += install-polkit -UNINSTALL_LOCAL += uninstall-polkit -endif WITH_POLKIT - -endif WITH_LIBVIRTD - # This is needed for clients too, so can't wrap in # the WITH_LIBVIRTD conditional if WITH_SASL diff --git a/src/remote/meson.build b/src/remote/meson.build index 2aedad1881..4eb1efe903 100644 --- a/src/remote/meson.build +++ b/src/remote/meson.build @@ -246,6 +246,20 @@ if conf.has('WITH_REMOTE') rename: [ '60-libvirtd.conf' ], ) endif + + if conf.has('WITH_POLKIT') + polkitdir = datadir / 'polkit-1' + install_data( + 'libvirtd.policy', + install_dir: polkitdir / 'actions', + rename: [ 'org.libvirt.unix.policy' ], + ) + install_data( + 'libvirtd.rules', + install_dir: polkitdir / 'rules.d', + rename: [ '50-libvirt.rules' ], + ) + endif endif endif