meson: properly conditionalize polkit installation
... including pkla installation on Debian. v2: - fix polkit-gobject-1 pkgconfig name
This commit is contained in:
parent
b710072da4
commit
3ca0cb7363
15
meson.build
15
meson.build
|
@ -617,6 +617,21 @@ if smack_run_label != ''
|
||||||
m4_defines += ['-DHAVE_SMACK_RUN_LABEL']
|
m4_defines += ['-DHAVE_SMACK_RUN_LABEL']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
want_polkit = get_option('polkit')
|
||||||
|
install_polkit = false
|
||||||
|
install_polkit_pkla = false
|
||||||
|
if want_polkit != 'no'
|
||||||
|
conf.set('ENABLE_POLKIT', 1)
|
||||||
|
install_polkit = true
|
||||||
|
|
||||||
|
libpolkit = dependency('polkit-gobject-1',
|
||||||
|
required : false)
|
||||||
|
if libpolkit.found() and libpolkit.version().version_compare('< 0.106')
|
||||||
|
message('Old polkit detected, will install pkla files')
|
||||||
|
install_polkit_pkla = true
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
want_audit = get_option('audit')
|
want_audit = get_option('audit')
|
||||||
if want_audit != 'no'
|
if want_audit != 'no'
|
||||||
libaudit = dependency('audit', required : want_audit == 'yes')
|
libaudit = dependency('audit', required : want_audit == 'yes')
|
||||||
|
|
|
@ -159,6 +159,8 @@ option('smack', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||||
description : 'SMACK support')
|
description : 'SMACK support')
|
||||||
option('smack-run-label', type : 'string',
|
option('smack-run-label', type : 'string',
|
||||||
description : 'run systemd --system itself with a specific SMACK label')
|
description : 'run systemd --system itself with a specific SMACK label')
|
||||||
|
option('polkit', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||||
|
description : 'PolicyKit support')
|
||||||
|
|
||||||
option('audit', type : 'combo', choices : ['auto', 'yes', 'no'],
|
option('audit', type : 'combo', choices : ['auto', 'yes', 'no'],
|
||||||
description : 'libaudit support')
|
description : 'libaudit support')
|
||||||
|
|
|
@ -203,7 +203,7 @@ custom_target(
|
||||||
input : policy_in,
|
input : policy_in,
|
||||||
output : 'org.freedesktop.systemd1.policy',
|
output : 'org.freedesktop.systemd1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
|
|
||||||
# TODO: this might work with meson from git, see
|
# TODO: this might work with meson from git, see
|
||||||
|
@ -214,7 +214,7 @@ custom_target(
|
||||||
# po_dir : po_dir,
|
# po_dir : po_dir,
|
||||||
# input : policy_in,
|
# input : policy_in,
|
||||||
# output : 'org.freedesktop.systemd1.policy',
|
# output : 'org.freedesktop.systemd1.policy',
|
||||||
# install : true,
|
# install : install_polkit,
|
||||||
# install_dir : polkitpolicydir)
|
# install_dir : polkitpolicydir)
|
||||||
|
|
||||||
install_data('system.conf',
|
install_data('system.conf',
|
||||||
|
|
|
@ -11,6 +11,6 @@ if conf.get('ENABLE_HOSTNAMED', 0) == 1
|
||||||
input : 'org.freedesktop.hostname1.policy.in',
|
input : 'org.freedesktop.hostname1.policy.in',
|
||||||
output : 'org.freedesktop.hostname1.policy',
|
output : 'org.freedesktop.hostname1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -61,7 +61,7 @@ if conf.get('ENABLE_IMPORTD', 0) == 1
|
||||||
input : 'org.freedesktop.import1.policy.in',
|
input : 'org.freedesktop.import1.policy.in',
|
||||||
output : 'org.freedesktop.import1.policy',
|
output : 'org.freedesktop.import1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
|
|
||||||
install_data('import-pubring.gpg',
|
install_data('import-pubring.gpg',
|
||||||
|
|
|
@ -19,7 +19,7 @@ if conf.get('ENABLE_LOCALED', 0) == 1
|
||||||
input : 'org.freedesktop.locale1.policy.in',
|
input : 'org.freedesktop.locale1.policy.in',
|
||||||
output : 'org.freedesktop.locale1.policy',
|
output : 'org.freedesktop.locale1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ if conf.get('ENABLE_LOGIND', 0) == 1
|
||||||
input : 'org.freedesktop.login1.policy.in',
|
input : 'org.freedesktop.login1.policy.in',
|
||||||
output : 'org.freedesktop.login1.policy',
|
output : 'org.freedesktop.login1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
|
|
||||||
install_data('70-power-switch.rules',
|
install_data('70-power-switch.rules',
|
||||||
|
|
|
@ -34,7 +34,7 @@ if conf.get('ENABLE_MACHINED', 0) == 1
|
||||||
input : 'org.freedesktop.machine1.policy.in',
|
input : 'org.freedesktop.machine1.policy.in',
|
||||||
output : 'org.freedesktop.machine1.policy',
|
output : 'org.freedesktop.machine1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -108,8 +108,14 @@ if conf.get('ENABLE_NETWORKD', 0) == 1
|
||||||
install_dir : dbuspolicydir)
|
install_dir : dbuspolicydir)
|
||||||
install_data('org.freedesktop.network1.service',
|
install_data('org.freedesktop.network1.service',
|
||||||
install_dir : dbussystemservicedir)
|
install_dir : dbussystemservicedir)
|
||||||
|
if install_polkit
|
||||||
install_data('systemd-networkd.rules',
|
install_data('systemd-networkd.rules',
|
||||||
install_dir : polkitrulesdir)
|
install_dir : polkitrulesdir)
|
||||||
|
endif
|
||||||
|
if install_polkit_pkla
|
||||||
|
install_data('systemd-networkd.pkla',
|
||||||
|
install_dir : polkitpkladir)
|
||||||
|
endif
|
||||||
|
|
||||||
tests += [
|
tests += [
|
||||||
[['src/network/test-networkd-conf.c'],
|
[['src/network/test-networkd-conf.c'],
|
||||||
|
|
|
@ -11,6 +11,6 @@ if conf.get('ENABLE_TIMEDATED', 0) == 1
|
||||||
input : 'org.freedesktop.timedate1.policy.in',
|
input : 'org.freedesktop.timedate1.policy.in',
|
||||||
output : 'org.freedesktop.timedate1.policy',
|
output : 'org.freedesktop.timedate1.policy',
|
||||||
command : intltool_command,
|
command : intltool_command,
|
||||||
install : true,
|
install : install_polkit,
|
||||||
install_dir : polkitpolicydir)
|
install_dir : polkitpolicydir)
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue