From 8aa3b0326146840b7c01c4d353b5526c3e2a07f4 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sun, 18 Feb 2018 04:44:59 -0500 Subject: dbus: Add option to use app-id for bus name This is required for Flatpak but is an API break so it is opt-in for now. --- src/common/dbus/meson.build | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/common/dbus/meson.build') diff --git a/src/common/dbus/meson.build b/src/common/dbus/meson.build index 56443377..69066be0 100644 --- a/src/common/dbus/meson.build +++ b/src/common/dbus/meson.build @@ -14,11 +14,22 @@ dbus_includes = [ dbus_service_dir = join_paths(get_option('datadir'), 'dbus-1/services') +if get_option('dbus-service-use-appid') + dbus_service_name = 'io.github.Hexchat' + dbus_output_file = 'io.github.Hexchat.service' + dbus_cargs = '-DDBUS_SERVICE="io.github.Hexchat"' +else + dbus_service_name = 'org.hexchat.service' + dbus_output_file = 'org.hexchat.service.service' + dbus_cargs = '-DDBUS_SERVICE="org.hexchat.service"' +endif + dbus_conf = configuration_data() dbus_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir'))) +dbus_conf.set('service_name', dbus_service_name) configure_file( input: 'org.hexchat.service.service.in', - output: 'org.hexchat.service.service', + output: dbus_output_file, configuration: dbus_conf, install: true, install_dir: dbus_service_dir @@ -34,6 +45,7 @@ dbus_remote_object = custom_target('remote-object-glue', hexchat_dbus = static_library('hexchatdbus', sources: [dbus_remote_object, marshal] + dbus_sources, + c_args: dbus_cargs, dependencies: common_deps + dbus_deps, include_directories: dbus_includes, pic: true -- cgit 1.4.1