summaryrefslogtreecommitdiff
path: root/daemon/meson.build
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-11-06 19:40:59 +0100
committerIñigo Martínez <inigomartinez@gmail.com>2017-11-07 13:19:35 +0100
commit327f1eee192a742a92e57345d25eda85cce630e6 (patch)
tree059667ec36f338bb0e00e058526ee50d01648802 /daemon/meson.build
parentd1189c1bede6a6cd2b6e89dfe50d66fead49a47e (diff)
downloadgvfs-327f1eee192a742a92e57345d25eda85cce630e6.tar.gz
build: Make SystemdService entry conditional
When systemd user units installation is disabled, SystemdService entry should also not be present on D-Bus service files. This patch adds a common D-Bus service file template allowing, an homogeneus D-Bus service file generation and also a SystemService entry conditioned to the systemd user units installation option. https://bugzilla.gnome.org/show_bug.cgi?id=786149
Diffstat (limited to 'daemon/meson.build')
-rw-r--r--daemon/meson.build27
1 files changed, 18 insertions, 9 deletions
diff --git a/daemon/meson.build b/daemon/meson.build
index a31f5f6e..6dda4d6b 100644
--- a/daemon/meson.build
+++ b/daemon/meson.build
@@ -1,15 +1,9 @@
subdir('trashlib')
# D-Bus and systemd service files
-service = gvfs_namespace + '.Daemon.service'
-
-daemon_service = configure_file(
- input: service + '.in',
- output: service,
- install: true,
- install_dir: dbus_service_dir,
- configuration: service_conf
-)
+dbus_service = gvfs_namespace + '.Daemon'
+dbus_exec = 'gvfsd'
+dbus_systemd_service = ''
if install_systemd_user_unit_dir
service = 'gvfs-daemon.service'
@@ -21,8 +15,23 @@ if install_systemd_user_unit_dir
install_dir: systemd_user_unit_dir,
configuration: service_conf
)
+
+ dbus_systemd_service = 'SystemdService=' + service
endif
+dbus_service_conf = configuration_data()
+dbus_service_conf.set('service', dbus_service)
+dbus_service_conf.set('exec', join_paths(gvfs_libexecdir, dbus_exec))
+dbus_service_conf.set('systemd_service', dbus_systemd_service)
+
+daemon_service = configure_file(
+ input: dbus_service_in,
+ output: dbus_service + '.service',
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: dbus_service_conf
+)
+
gnome.mkenums(
'org.gnome.system.gvfs.enums.xml',
sources: 'gvfs-enums.h',