diff --git a/data/meson.build b/data/meson.build index e188221..97dbc07 100644 --- a/data/meson.build +++ b/data/meson.build @@ -20,3 +20,18 @@ configure_file( configuration: data_conf, install_dir: dbusconfdir ) + +polkit_policy = 'net.hadess.SensorProxy.policy' +if xmllint.found() + test(polkit_policy, + xmllint, + args: [ + '--noout', + meson.source_root() / 'data' / polkit_policy, + ]) +endif + +install_data( + polkit_policy, + install_dir: polkit_policy_directory, +) diff --git a/data/net.hadess.SensorProxy.policy b/data/net.hadess.SensorProxy.policy new file mode 100644 index 0000000..a37ab77 --- /dev/null +++ b/data/net.hadess.SensorProxy.policy @@ -0,0 +1,21 @@ + + + + + + iio-sensor-proxy + https://gitlab.freedesktop.org/hadess/iio-sensor-proxy + + + Claim Access to a Sensor + Privileges are required to claim a sensor. + + no + no + yes + + + + diff --git a/meson.build b/meson.build index e8f16c1..4485316 100644 --- a/meson.build +++ b/meson.build @@ -45,6 +45,8 @@ endif gio_dep = dependency('gio-2.0') gudev_dep = dependency('gudev-1.0', version: '>= 237') +xmllint = find_program('xmllint', required: false) + gnome = import('gnome') add_global_arguments('-D_GNU_SOURCE=1', language: 'c')