... including pkla installation on Debian.
v2:
- fix polkit-gobject-1 pkgconfig name
m4_defines += ['-DHAVE_SMACK_RUN_LABEL']
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')
if want_audit != 'no'
libaudit = dependency('audit', required : want_audit == 'yes')
description : 'SMACK support')
option('smack-run-label', type : 'string',
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'],
description : 'libaudit support')
input : policy_in,
output : 'org.freedesktop.systemd1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
# TODO: this might work with meson from git, see
# po_dir : po_dir,
# input : policy_in,
# output : 'org.freedesktop.systemd1.policy',
-# install : true,
+# install : install_polkit,
# install_dir : polkitpolicydir)
install_data('system.conf',
input : 'org.freedesktop.hostname1.policy.in',
output : 'org.freedesktop.hostname1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
endif
input : 'org.freedesktop.import1.policy.in',
output : 'org.freedesktop.import1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
install_data('import-pubring.gpg',
input : 'org.freedesktop.locale1.policy.in',
output : 'org.freedesktop.locale1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
endif
input : 'org.freedesktop.login1.policy.in',
output : 'org.freedesktop.login1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
install_data('70-power-switch.rules',
input : 'org.freedesktop.machine1.policy.in',
output : 'org.freedesktop.machine1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
endif
install_dir : dbuspolicydir)
install_data('org.freedesktop.network1.service',
install_dir : dbussystemservicedir)
- install_data('systemd-networkd.rules',
- install_dir : polkitrulesdir)
+ if install_polkit
+ install_data('systemd-networkd.rules',
+ install_dir : polkitrulesdir)
+ endif
+ if install_polkit_pkla
+ install_data('systemd-networkd.pkla',
+ install_dir : polkitpkladir)
+ endif
tests += [
[['src/network/test-networkd-conf.c'],
input : 'org.freedesktop.timedate1.policy.in',
output : 'org.freedesktop.timedate1.policy',
command : intltool_command,
- install : true,
+ install : install_polkit,
install_dir : polkitpolicydir)
endif