[gvfs] Revert "build: Make monitors build commands common"



commit 087698000f227eb43f22cd5796e0a3f844c67179
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Jan 7 17:44:10 2019 +0100

    Revert "build: Make monitors build commands common"
    
    This reverts commit c25bc351bb2605e57bc9a6d9250c9d4748c3d9e0.

 monitor/afc/meson.build     | 38 ++++++++++++++++++++++++
 monitor/goa/meson.build     | 36 +++++++++++++++++++++++
 monitor/gphoto2/meson.build | 39 +++++++++++++++++++++++++
 monitor/meson.build         | 70 ++++++---------------------------------------
 monitor/mtp/meson.build     | 36 +++++++++++++++++++++++
 monitor/udisks2/meson.build | 38 ++++++++++++++++++++++++
 test/meson.build            | 14 ++++++++-
 7 files changed, 209 insertions(+), 62 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',
diff --git a/test/meson.build b/test/meson.build
index 77d2044c..53c3c979 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -37,8 +37,20 @@ if enable_installed_tests
     metadata_service
   ]
 
+  if enable_afc
+    test_data += [afc_monitor, afc_service]
+  endif
+
+  if enable_gphoto2
+    test_data += [gphoto2_monitor, gphoto2_service]
+  endif
+
+  if enable_udisks2
+    test_data += [udisks2_monitor, udisks2_service]
+  endif
+
   install_data(
-    test_data + monitors_test_data,
+    test_data,
     install_dir: installed_tests_execdir
   )
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]