diff options
-rw-r--r-- | src/dbus/server/org.syncevolution.service.in | 1 | ||||
-rw-r--r-- | src/dbus/server/pim/org._01.pim.contacts.service.in | 1 | ||||
-rw-r--r-- | src/dbus/server/server.am | 10 | ||||
-rw-r--r-- | src/dbus/server/syncevo-dbus-server.service.in | 7 |
4 files changed, 19 insertions, 0 deletions
diff --git a/src/dbus/server/org.syncevolution.service.in b/src/dbus/server/org.syncevolution.service.in index edc63764..7799cb68 100644 --- a/src/dbus/server/org.syncevolution.service.in +++ b/src/dbus/server/org.syncevolution.service.in @@ -1,3 +1,4 @@ [D-BUS Service] Name=org.syncevolution Exec=@libexecdir@/syncevo-dbus-server @SYNCEVO_DBUS_SERVER_ARGS@ +SystemdService=syncevo-dbus-server.service diff --git a/src/dbus/server/pim/org._01.pim.contacts.service.in b/src/dbus/server/pim/org._01.pim.contacts.service.in index e892372c..86122adf 100644 --- a/src/dbus/server/pim/org._01.pim.contacts.service.in +++ b/src/dbus/server/pim/org._01.pim.contacts.service.in @@ -1,3 +1,4 @@ [D-BUS Service] Name=org._01.pim.contacts Exec=@libexecdir@/syncevo-dbus-server @SYNCEVO_DBUS_SERVER_ARGS@ +SystemdService=syncevo-dbus-server.service diff --git a/src/dbus/server/server.am b/src/dbus/server/server.am index 8ecfe64d..18c631fe 100644 --- a/src/dbus/server/server.am +++ b/src/dbus/server/server.am @@ -117,6 +117,7 @@ src_dbus_server_libsyncevodbushelper_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS) $(C # Deal with .service, .desktop and startup script files. CLEANFILES += \ $(src_dbus_server_service_files) \ + $(src_dbus_server_systemd_files) \ $(src_dbus_server_desktop) \ $(src_dbus_server_script) @@ -137,10 +138,18 @@ src_dbus_server_service_files_in = src/dbus/server/org.syncevolution.service.in src_dbus_server_service_files = $(src_dbus_server_service_files_in:.service.in=.service) src_dbus_server_servicedir = $(DBUS_SERVICES_DIR) src_dbus_server_service_DATA = $(src_dbus_server_service_files) + +src_dbus_server_systemd_files_in = src/dbus/server/syncevo-dbus-server.service.in +src_dbus_server_systemd_files = $(src_dbus_server_systemd_files_in:.service.in=.service) +src_dbus_server_systemddir = $(prefix)/lib/systemd/user +src_dbus_server_systemd_DATA = $(src_dbus_server_systemd_files) + +# this works for both dbus and systemd service files src/dbus/server/%.service: src/dbus/server/%.service.in @sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@SYNCEVO_DBUS_SERVER_ARGS\@|$(SYNCEVO_DBUS_SERVER_ARGS)|" $< >$@ if COND_DBUS_PIM +# this shares syncevo-dbus-server.service src_dbus_server_service_files_in += \ src/dbus/server/pim/org._01.pim.contacts.service.in @@ -175,6 +184,7 @@ endif # COND_DBUS_PIM dist_noinst_DATA += \ $(src_dbus_server_service_files_in) \ + $(src_dbus_server_systemd_files_in) \ $(src_dbus_server_script_in) \ $(src_dbus_server_desktop_in) diff --git a/src/dbus/server/syncevo-dbus-server.service.in b/src/dbus/server/syncevo-dbus-server.service.in new file mode 100644 index 00000000..8c223595 --- /dev/null +++ b/src/dbus/server/syncevo-dbus-server.service.in @@ -0,0 +1,7 @@ +[Unit] +Description=personal information management synchronization service + +[Service] +Type=dbus +BusName=org.syncevolution +ExecStart=@libexecdir@/syncevo-dbus-server @SYNCEVO_DBUS_SERVER_ARGS@ |