upower/policy/meson.build
Kate Hsuan 7011b93c28 Revert "policy: Remove policy for removed features"
This reverts commit ababfa2aaf.

Changes:
1. Drop the policy for the old APIs.
2. Add a policy for enableChargeLimit.
2024-08-22 14:20:33 +08:00

24 lines
No EOL
822 B
Meson

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