aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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