summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2019-01-07 17:44:10 +0100
committerOndrej Holy <oholy@redhat.com>2019-01-07 17:44:10 +0100
commit087698000f227eb43f22cd5796e0a3f844c67179 (patch)
treebd34b0c723728922841b013a9e6918af6a348821 /monitor
parent44b2c1581a2deea690f6002fe9fe94f83c97f5a9 (diff)
downloadgvfs-087698000f227eb43f22cd5796e0a3f844c67179.tar.gz
Revert "build: Make monitors build commands common"
This reverts commit c25bc351bb2605e57bc9a6d9250c9d4748c3d9e0.
Diffstat (limited to 'monitor')
-rw-r--r--monitor/afc/meson.build38
-rw-r--r--monitor/goa/meson.build36
-rw-r--r--monitor/gphoto2/meson.build39
-rw-r--r--monitor/meson.build70
-rw-r--r--monitor/mtp/meson.build36
-rw-r--r--monitor/udisks2/meson.build38
6 files changed, 196 insertions, 61 deletions
diff --git a/monitor/afc/meson.build b/monitor/afc/meson.build
index 741f64e5..0af5a8d3 100644
--- a/monitor/afc/meson.build
+++ b/monitor/afc/meson.build
@@ -1,3 +1,41 @@
+afc_monitor = files('afc.monitor')
+
+install_data(
+ afc_monitor,
+ install_dir: gvfs_remote_volume_monitors_dir
+)
+
+dbus_service = gvfs_namespace + '.AfcVolumeMonitor'
+dbus_exec = 'gvfs-afc-volume-monitor'
+dbus_systemd_service = ''
+
+if install_systemd_user_unit_dir
+ service = dbus_exec + '.service'
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ 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)
+
+afc_service = configure_file(
+ input: dbus_service_in,
+ output: dbus_service + '.service',
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: dbus_service_conf
+)
+
sources = files(
'afcvolumemonitordaemon.c',
'afcvolume.c',
diff --git a/monitor/goa/meson.build b/monitor/goa/meson.build
index 563d380c..7be878ad 100644
--- a/monitor/goa/meson.build
+++ b/monitor/goa/meson.build
@@ -1,3 +1,39 @@
+install_data(
+ 'goa.monitor',
+ install_dir: gvfs_remote_volume_monitors_dir
+)
+
+dbus_service = gvfs_namespace + '.GoaVolumeMonitor'
+dbus_exec = 'gvfs-goa-volume-monitor'
+dbus_systemd_service = ''
+
+if install_systemd_user_unit_dir
+ service = dbus_exec + '.service'
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ 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)
+
+configure_file(
+ input: dbus_service_in,
+ output: dbus_service + '.service',
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: dbus_service_conf
+)
+
sources = files(
'goavolumemonitordaemon.c',
'goavolume.c',
diff --git a/monitor/gphoto2/meson.build b/monitor/gphoto2/meson.build
index 63b4e8c7..c3f4c78a 100644
--- a/monitor/gphoto2/meson.build
+++ b/monitor/gphoto2/meson.build
@@ -1,3 +1,42 @@
+gphoto2_monitor = files('gphoto2.monitor')
+
+install_data(
+ gphoto2_monitor,
+ install_dir: gvfs_remote_volume_monitors_dir
+)
+
+
+dbus_service = gvfs_namespace + '.GPhoto2VolumeMonitor'
+dbus_exec = 'gvfs-gphoto2-volume-monitor'
+dbus_systemd_service = ''
+
+if install_systemd_user_unit_dir
+ service = dbus_exec + '.service'
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ 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)
+
+gphoto2_service = configure_file(
+ input: dbus_service_in,
+ output: dbus_service + '.service',
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: dbus_service_conf
+)
+
sources = files(
'gphoto2-volume-monitor-daemon.c',
'ggphoto2volume.c',
diff --git a/monitor/meson.build b/monitor/meson.build
index 53e18806..f841bdce 100644
--- a/monitor/meson.build
+++ b/monitor/meson.build
@@ -1,73 +1,21 @@
subdir('proxy')
-# [[service name suffix, install monitor test data]]
-monitors = []
-
-if enable_afc
- monitors += [['Afc', true]]
+if enable_udisks2
+ subdir('udisks2')
endif
-if enable_goa
- monitors += [['Goa', false]]
+if enable_gphoto2
+ subdir('gphoto2')
endif
-if enable_gphoto2
- monitors += [['GPhoto2', true]]
+if enable_afc
+ subdir('afc')
endif
if enable_mtp
- monitors += [['MTP', false]]
+ subdir('mtp')
endif
-if enable_udisks2
- monitors += [['UDisks2', true]]
+if enable_goa
+ subdir('goa')
endif
-
-monitors_test_data = []
-foreach monitor: monitors
- monitor_name = monitor[0].to_lower()
-
- dbus_service = '@0@.@1@VolumeMonitor'.format(gvfs_namespace, monitor[0])
- dbus_exec = 'gvfs-@0@-volume-monitor'.format(monitor_name)
- dbus_systemd_service = ''
-
- if install_systemd_user_unit_dir
- service = dbus_exec + '.service'
-
- configure_file(
- input: join_paths(monitor_name, service + '.in'),
- output: service,
- install: true,
- install_dir: systemd_user_unit_dir,
- configuration: service_conf
- )
-
- dbus_systemd_service = 'SystemdService=' + service
- endif
-
- monitor_data = files(join_paths(monitor_name, monitor_name + '.monitor'))
-
- install_data(
- monitor_data,
- install_dir: gvfs_remote_volume_monitors_dir
- )
-
- 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)
-
- monitor_service = configure_file(
- input: dbus_service_in,
- output: dbus_service + '.service',
- install: true,
- install_dir: dbus_service_dir,
- configuration: dbus_service_conf
- )
-
- if monitor[1]
- monitors_test_data += [monitor_data, monitor_service]
- endif
-
- subdir(monitor_name)
-endforeach
diff --git a/monitor/mtp/meson.build b/monitor/mtp/meson.build
index ec94c688..77f47a16 100644
--- a/monitor/mtp/meson.build
+++ b/monitor/mtp/meson.build
@@ -1,3 +1,39 @@
+install_data(
+ 'mtp.monitor',
+ install_dir: gvfs_remote_volume_monitors_dir
+)
+
+dbus_service = gvfs_namespace + '.MTPVolumeMonitor'
+dbus_exec = 'gvfs-mtp-volume-monitor'
+dbus_systemd_service = ''
+
+if install_systemd_user_unit_dir
+ service = dbus_exec + '.service'
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ 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)
+
+configure_file(
+ input: dbus_service_in,
+ output: dbus_service + '.service',
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: dbus_service_conf
+)
+
sources = files(
'mtp-volume-monitor-daemon.c',
'gmtpvolume.c',
diff --git a/monitor/udisks2/meson.build b/monitor/udisks2/meson.build
index 26ccc142..d16339b2 100644
--- a/monitor/udisks2/meson.build
+++ b/monitor/udisks2/meson.build
@@ -1,3 +1,41 @@
+udisks2_monitor = files('udisks2.monitor')
+
+install_data(
+ udisks2_monitor,
+ install_dir: gvfs_remote_volume_monitors_dir
+)
+
+dbus_service = gvfs_namespace + '.UDisks2VolumeMonitor'
+dbus_exec = 'gvfs-udisks2-volume-monitor'
+dbus_systemd_service = ''
+
+if install_systemd_user_unit_dir
+ service = dbus_exec + '.service'
+
+ configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ 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)
+
+udisks2_service = configure_file(
+ input: dbus_service_in,
+ output: dbus_service + '.service',
+ install: true,
+ install_dir: dbus_service_dir,
+ configuration: dbus_service_conf
+)
+
sources = files(
'udisks2volumemonitordaemon.c',
'gvfsudisks2drive.c',