aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-10-31 18:03:20 +0000
committerTarmac <Unknown>2013-10-31 18:03:20 +0000
commiteb291a003c77b0ecb1c4a18077142db3bc5006a6 (patch)
tree5a3998ab4cdb8136998db5060317cfd2acc2e0bb
parentf725b01b7e0138e432e68eef452a882c7d6f1b6e (diff)
parent67c319bdd36972d74977323ed181574902bfe658 (diff)
downloadayatana-indicator-session-eb291a003c77b0ecb1c4a18077142db3bc5006a6.tar.gz
ayatana-indicator-session-eb291a003c77b0ecb1c4a18077142db3bc5006a6.tar.bz2
ayatana-indicator-session-eb291a003c77b0ecb1c4a18077142db3bc5006a6.zip
Upstart job for indicator-session. Fixes: https://bugs.launchpad.net/bugs/1185565.
Approved by PS Jenkins bot, Charles Kerr.
-rw-r--r--.bzrignore1
-rw-r--r--data/CMakeLists.txt39
-rw-r--r--data/indicator-session.conf.in8
-rw-r--r--data/indicator-session.desktop.in9
-rw-r--r--data/indicator-session.service.in3
5 files changed, 48 insertions, 12 deletions
diff --git a/.bzrignore b/.bzrignore
index 992e18f..56f46ef 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -253,3 +253,4 @@ dbus-display-manager.h
dbus-user.c
dbus-user.h
tests/test-service
+indicator-session.conf
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index ac4e76c..163e2cd 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -17,24 +17,45 @@ add_schema (${SCHEMA_FILE})
##
-## DBus Service File
+## Upstart Config File
##
# where to install
-set (DBUS_SERVICE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/dbus-1/services")
-message (STATUS "${DBUS_SERVICE_DIR} is the DBus Service File install dir")
+set (UPSTART_JOB_DIR "${CMAKE_INSTALL_FULL_DATADIR}/upstart/sessions")
+message (STATUS "${UPSTART_JOB_DIR} is the Upstart Job install dir")
-set (SERVICE_NAME "${CMAKE_PROJECT_NAME}.service")
-set (SERVICE_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SERVICE_NAME}")
-set (SERVICE_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SERVICE_NAME}.in")
+set (UPSTART_JOB_NAME "${CMAKE_PROJECT_NAME}.conf")
+set (UPSTART_JOB_FILE "${CMAKE_CURRENT_BINARY_DIR}/${UPSTART_JOB_NAME}")
+set (UPSTART_JOB_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${UPSTART_JOB_NAME}.in")
# build it
set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
-configure_file ("${SERVICE_FILE_IN}" "${SERVICE_FILE}")
+configure_file ("${UPSTART_JOB_FILE_IN}" "${UPSTART_JOB_FILE}")
# install it
-install (FILES "${SERVICE_FILE}"
- DESTINATION "${DBUS_SERVICE_DIR}")
+install (FILES "${UPSTART_JOB_FILE}"
+ DESTINATION "${UPSTART_JOB_DIR}")
+
+
+##
+## XDG Autostart Config File
+##
+
+# where to install
+set (XDG_AUTOSTART_DIR "/etc/xdg/autostart")
+message (STATUS "${XDG_AUTOSTART_DIR} is the XDG Autostart install dir")
+
+set (XDG_AUTOSTART_NAME "${CMAKE_PROJECT_NAME}.desktop")
+set (XDG_AUTOSTART_FILE "${CMAKE_CURRENT_BINARY_DIR}/${XDG_AUTOSTART_NAME}")
+set (XDG_AUTOSTART_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${XDG_AUTOSTART_NAME}.in")
+
+# build it
+set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("${XDG_AUTOSTART_FILE_IN}" "${XDG_AUTOSTART_FILE}")
+
+# install it
+install (FILES "${XDG_AUTOSTART_FILE}"
+ DESTINATION "${XDG_AUTOSTART_DIR}")
##
diff --git a/data/indicator-session.conf.in b/data/indicator-session.conf.in
new file mode 100644
index 0000000..6bd93a2
--- /dev/null
+++ b/data/indicator-session.conf.in
@@ -0,0 +1,8 @@
+description "Indicator Session Service"
+
+start on indicators-loaded or indicator-services-start
+stop on desktop-end or indicator-services-end
+
+respawn
+
+exec @pkglibexecdir@/indicator-session-service
diff --git a/data/indicator-session.desktop.in b/data/indicator-session.desktop.in
new file mode 100644
index 0000000..b6d289d
--- /dev/null
+++ b/data/indicator-session.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Session
+Exec=@pkglibexecdir@/indicator-session-service
+NotShowIn=Unity;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+
diff --git a/data/indicator-session.service.in b/data/indicator-session.service.in
deleted file mode 100644
index e520e20..0000000
--- a/data/indicator-session.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.canonical.indicator.session
-Exec=@pkglibexecdir@/indicator-session-service