aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore2
-rw-r--r--data/CMakeLists.txt34
-rw-r--r--data/indicator-sound.conf.in11
-rw-r--r--data/indicator-sound.desktop.in9
-rw-r--r--data/indicator-sound.service.in3
5 files changed, 48 insertions, 11 deletions
diff --git a/.bzrignore b/.bzrignore
index 150b72b..166a1ca 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -1,7 +1,7 @@
/po/POTFILES
/po/stamp-it
-/data/indicator-sound.service
+/data/indicator-sound.conf
/src/indicator-sound-service
/src/indicator_sound_service_vala.stamp
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index c66ca69..565e652 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -17,23 +17,43 @@ install(
)
###########################
-# Dbus Service
+# Upstart Job
###########################
set(
- INDICATOR_SOUND_SERVICE
- "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound.service"
+ INDICATOR_SOUND_CONF
+ "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound.conf"
)
configure_file(
- "indicator-sound.service.in"
- ${INDICATOR_SOUND_SERVICE}
+ "indicator-sound.conf.in"
+ ${INDICATOR_SOUND_CONF}
@ONLY
)
install(
- FILES "${INDICATOR_SOUND_SERVICE}"
- DESTINATION "${CMAKE_INSTALL_DATADIR}/dbus-1/services/"
+ FILES "${INDICATOR_SOUND_CONF}"
+ DESTINATION "${CMAKE_INSTALL_DATADIR}/upstart/sessions/"
+)
+
+###########################
+# XDG Autostart
+###########################
+
+set(
+ INDICATOR_SOUND_XDG_AUTOSTART
+ "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound.desktop"
+)
+
+configure_file(
+ "indicator-sound.desktop.in"
+ ${INDICATOR_SOUND_XDG_AUTOSTART}
+ @ONLY
+)
+
+install(
+ FILES "${INDICATOR_SOUND_XDG_AUTOSTART}"
+ DESTINATION "/etc/xdg/autostart"
)
###########################
diff --git a/data/indicator-sound.conf.in b/data/indicator-sound.conf.in
new file mode 100644
index 0000000..a5f4b4d
--- /dev/null
+++ b/data/indicator-sound.conf.in
@@ -0,0 +1,11 @@
+description "Indicator Sound Backend"
+
+# Want to move to indicator-services-[start|end], but that's not all
+# there yet. Use the signals that exist today for now.
+
+start on indicators-loaded or indicator-services-start
+stop on desktop-end or indicator-services-end
+
+respawn
+
+exec @CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service
diff --git a/data/indicator-sound.desktop.in b/data/indicator-sound.desktop.in
new file mode 100644
index 0000000..aeb6440
--- /dev/null
+++ b/data/indicator-sound.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Sound
+Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service
+NotShowIn=Unity;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+
diff --git a/data/indicator-sound.service.in b/data/indicator-sound.service.in
deleted file mode 100644
index 34309b2..0000000
--- a/data/indicator-sound.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.canonical.indicator.sound
-Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service