power-profiles-daemon/data/meson.build
Marco Trevisan (Treviño) 3b29b0e52b cleanup: Use UPower namespace as default DBus name preserving old one
Expose the daemon as 'org.freedesktop.UPower.PowerProfiles' by default
but we also own the old 'net.hadess.PowerProfiles' name for
compatibility resons.

Also dbus objects are now registered also in the path
/org/freedesktop/UPower/PowerProfiles and they implement the
org.freedesktop.UPower.PowerProfiles interface.

Even in this case we preserve the compatibility with the old ones.

To make this switch as most reliable as possible, the code is now
generated for dbus configuration files preserving the previous ones as
base.

Tests are now performed checking both names, to ensure again that we're
not breaking the expectations for the old APIs consumers.
2024-02-13 20:44:29 +00:00

44 lines
921 B
Meson

configure_file(
input: 'power-profiles-daemon.service.in',
output: 'power-profiles-daemon.service',
configuration: {
'libexecdir': libexecdir,
},
install_dir: systemd_system_unit_dir,
)
foreach name, _: bus_names
config = {
'dbus_name': name,
'dbus_iface': name,
}
configure_file(
input: 'power-profiles-daemon.dbus.conf.in',
output: name + '.conf',
configuration: config,
install_dir: dbusconfdir
)
configure_file(
input: 'power-profiles-daemon.dbus.service.in',
output: name + '.service',
configuration: config,
install_dir: dbusservicedir
)
endforeach
polkit_policy = 'power-profiles-daemon.policy'
if xmllint.found()
test(polkit_policy,
xmllint,
args: [
'--noout',
meson.project_source_root() / 'data' / polkit_policy,
])
endif
install_data(
polkit_policy,
install_dir: polkit_policy_directory,
)