meson: remove duplication of polkit dirs construction

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2025-01-03 16:22:30 +00:00
parent b996e99c51
commit c244d041d9
3 changed files with 5 additions and 4 deletions

View File

@ -114,6 +114,8 @@ localedir = prefix / get_option('localedir')
mandir = prefix / get_option('mandir') mandir = prefix / get_option('mandir')
sbindir = prefix / get_option('sbindir') sbindir = prefix / get_option('sbindir')
sharedstatedir = prefix / get_option('sharedstatedir') sharedstatedir = prefix / get_option('sharedstatedir')
polkitactionsdir = datadir / 'polkit-1' / 'actions'
polkitrulesdir = datadir / 'polkit-1' / 'rules.d'
docdir = get_option('docdir') docdir = get_option('docdir')
if docdir == '' if docdir == ''

View File

@ -73,7 +73,7 @@ if conf.has('WITH_POLKIT')
command: [ meson_python_prog, python3_prog, genpolkit_prog, '@INPUT@' ], command: [ meson_python_prog, python3_prog, genpolkit_prog, '@INPUT@' ],
capture: true, capture: true,
install: true, install: true,
install_dir: datadir / 'polkit-1' / 'actions', install_dir: polkitactionsdir,
) )
endif endif
endif endif

View File

@ -294,15 +294,14 @@ if conf.has('WITH_REMOTE')
endif endif
if conf.has('WITH_POLKIT') if conf.has('WITH_POLKIT')
polkitdir = datadir / 'polkit-1'
install_data( install_data(
'libvirtd.policy', 'libvirtd.policy',
install_dir: polkitdir / 'actions', install_dir: polkitactionsdir,
rename: [ 'org.libvirt.unix.policy' ], rename: [ 'org.libvirt.unix.policy' ],
) )
install_data( install_data(
'libvirtd.rules', 'libvirtd.rules',
install_dir: polkitdir / 'rules.d', install_dir: polkitrulesdir,
rename: [ '50-libvirt.rules' ], rename: [ '50-libvirt.rules' ],
) )
endif endif