meson: src/remote: install polkit files

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:38:17 +02:00
parent 2ee04534af
commit 329a1cac0b
2 changed files with 14 additions and 27 deletions

View File

@ -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

View File

@ -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