diff --git a/howdy-gtk/meson.build b/howdy-gtk/meson.build index 08c9acac..f4970565 100644 --- a/howdy-gtk/meson.build +++ b/howdy-gtk/meson.build @@ -79,3 +79,17 @@ install_data( install_dir: get_option('prefix') / get_option('bindir'), install_tag: 'bin', ) + +if get_option('with_polkit') + polkit_config = configure_file( + input: 'src/polkit/com.github.boltgolt.howdy-gtk.policy.in', + output: 'com.github.boltgolt.howdy-gtk.policy', + configuration: {'script_path': cli_path, 'python_path': py.full_path()} + ) + install_data( + polkit_config, + install_dir: get_option('prefix') / get_option('datadir') / 'polkit-1' / 'actions', + install_mode: 'rw-r--r--', + install_tag: 'polkit', + ) +endif diff --git a/howdy-gtk/src/polkit/com.github.boltgolt.howdy-gtk.policy.in b/howdy-gtk/src/polkit/com.github.boltgolt.howdy-gtk.policy.in new file mode 100644 index 00000000..bf2c716c --- /dev/null +++ b/howdy-gtk/src/polkit/com.github.boltgolt.howdy-gtk.policy.in @@ -0,0 +1,20 @@ + + + + boltgolt + https://github.com/boltgolt/howdy + howdy-gtk + + Howdy interface + Authentication is required to run howdy-gtk + + no + no + auth_admin + + @python_path@ + @script_path@ + true + + \ No newline at end of file diff --git a/howdy/fedora/com.github.boltgolt.howdy.policy b/howdy/fedora/com.github.boltgolt.howdy.policy deleted file mode 100644 index de571eef..00000000 --- a/howdy/fedora/com.github.boltgolt.howdy.policy +++ /dev/null @@ -1,29 +0,0 @@ - - - - - boltgolt - https://github.com/boltgolt/ - - <_description>Add user profile - <_message>Privileges are required to verify facial recognition. - - no - no - yes - - - - - <_description>Remove user profile - <_message>Privileges are required to verify facial recognition. - - no - no - yes - - - - diff --git a/meson.options b/meson.options index 4c9940b3..56c8f160 100644 --- a/meson.options +++ b/meson.options @@ -6,5 +6,6 @@ option('user_models_dir', type: 'string', value: '', description: 'Set the user option('log_path', type: 'string', value: '/var/log/howdy', description: 'Set the log file path') option('install_in_site_packages', type: 'boolean', value: false, description: 'Install howdy python files in site packages') option('py_sources_dir', type: 'string', value: '', description: 'Set the python sources directory') +option('install_pam_config', type: 'boolean', value: false, description: 'Install pam config file (for Debian/Ubuntu)') option('python_path', type: 'string', value: '/usr/bin/python', description: 'Set the path to the python executable') -option('install_pam_config', type: 'boolean', value: false, description: 'Install pam config file (for Debian/Ubuntu)') \ No newline at end of file +option('with_polkit', type: 'boolean', value: false, description: 'Install polkit policy config file')