mirror of
https://gitlab.freedesktop.org/upower/upower.git
synced 2026-05-21 08:18:18 +02:00
The polkit rule gives upower the necessary permission to ignore the systemd inhibitor when upower runs the CriticalPowerAction. Signed-off-by: Kate Hsuan <hpa@redhat.com>
30 lines
No EOL
958 B
Meson
30 lines
No EOL
958 B
Meson
install_data(
|
|
'org.freedesktop.upower.rules',
|
|
install_tag: 'runtime',
|
|
install_dir: join_paths(datadir, 'polkit-1', 'rules.d'),
|
|
)
|
|
|
|
if polkit.found()
|
|
#newer polkit has the ITS rules included
|
|
if polkit.version().version_compare('>0.113')
|
|
i18n.merge_file(
|
|
input: 'org.freedesktop.upower.policy.in',
|
|
output: 'org.freedesktop.upower.policy',
|
|
install: true,
|
|
install_dir: join_paths(datadir, 'polkit-1', 'actions') ,
|
|
type: 'xml',
|
|
po_dir: join_paths(meson.project_source_root(), 'po')
|
|
)
|
|
#older polkit is missing ITS rules and will fail
|
|
else
|
|
i18n.merge_file(
|
|
input: 'org.freedesktop.upower.policy.in',
|
|
output: 'org.freedesktop.upower.policy',
|
|
install: true,
|
|
install_dir: join_paths(datadir, 'polkit-1', 'actions') ,
|
|
type: 'xml',
|
|
data_dirs: join_paths(meson.project_source_root(), 'policy'),
|
|
po_dir: join_paths(meson.project_source_root(), 'po')
|
|
)
|
|
endif
|
|
endif |