aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2013-10-31 21:43:03 +0000
committerTarmac <Unknown>2013-10-31 21:43:03 +0000
commit718edebc459637f58c4ff1a936b098a26c4b271a (patch)
treeb5abcd0a703de19480f30031eb52196c51ab8eb0
parentdec0ff403debe03f924ca03592b68c8760bce898 (diff)
parent49aa770cc1687267aca324b895ac5556457350a6 (diff)
downloadayatana-indicator-datetime-718edebc459637f58c4ff1a936b098a26c4b271a.tar.gz
ayatana-indicator-datetime-718edebc459637f58c4ff1a936b098a26c4b271a.tar.bz2
ayatana-indicator-datetime-718edebc459637f58c4ff1a936b098a26c4b271a.zip
Upstart Job. Fixes: https://bugs.launchpad.net/bugs/1185565.
Approved by PS Jenkins bot, Charles Kerr.
-rw-r--r--.bzrignore2
-rw-r--r--data/CMakeLists.txt38
-rw-r--r--data/indicator-datetime.conf.in8
-rw-r--r--data/indicator-datetime.desktop.in9
-rw-r--r--data/indicator-datetime.service.in3
-rw-r--r--debian/indicator-datetime.install3
6 files changed, 50 insertions, 13 deletions
diff --git a/.bzrignore b/.bzrignore
index 3f718b3..5bca87f 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -15,3 +15,5 @@ src/gen-datetime-service.xml.h
build-aux
data/com.canonical.indicator.datetime.gschema.valid
src/libdatetime_la-utils.lo
+data/indicator-datetime.conf
+data/indicator-datetime.desktop
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 197c5c6..ab393a7 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -9,24 +9,44 @@ add_schema (${SCHEMA_FILE})
##
-## DBus Service File
+## Upstart Job 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 File 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 File
+##
+
+# where to install
+set (XDG_AUTOSTART_DIR "/etc/xdg/autostart")
+message (STATUS "${XDG_AUTOSTART_DIR} is the DBus Service File 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-datetime.conf.in b/data/indicator-datetime.conf.in
new file mode 100644
index 0000000..ab9cfd6
--- /dev/null
+++ b/data/indicator-datetime.conf.in
@@ -0,0 +1,8 @@
+description "Indicator Date & Time Backend"
+
+start on indicators-loaded or indicator-services-start
+stop on desktop-end or indicator-services-end
+
+respawn
+
+exec @pkglibexecdir@/indicator-datetime-service
diff --git a/data/indicator-datetime.desktop.in b/data/indicator-datetime.desktop.in
new file mode 100644
index 0000000..5362af9
--- /dev/null
+++ b/data/indicator-datetime.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Date & Time
+Exec=@pkglibexecdir@/indicator-datetime-service
+NotShowIn=Unity;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+
diff --git a/data/indicator-datetime.service.in b/data/indicator-datetime.service.in
deleted file mode 100644
index a9100b8..0000000
--- a/data/indicator-datetime.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.canonical.indicator.datetime
-Exec=@pkglibexecdir@/indicator-datetime-service
diff --git a/debian/indicator-datetime.install b/debian/indicator-datetime.install
index b855558..1085d5f 100644
--- a/debian/indicator-datetime.install
+++ b/debian/indicator-datetime.install
@@ -1,5 +1,6 @@
usr/share/glib-2.0/schemas/*
-usr/share/dbus-1/services/*
+usr/share/upstart/sessions/*
usr/share/unity/indicators/*
usr/lib/*/indicator-datetime/indicator-datetime-service
usr/share/locale/*
+etc/xdg/autostart/*