aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2016-10-21 10:16:11 +0000
committerBileto Bot <ci-train-bot@canonical.com>2016-10-21 10:16:11 +0000
commit6c5f878df812b11bfc982a7dd3512ad8b44d5943 (patch)
tree7faeee5caaebb8efa40a1df60e6425606cda1619
parentf443e4dbee93def23bf99faf9ef27125ad2d4019 (diff)
parent4a27d20c72adb03792acd96c9b7908de6b73607c (diff)
downloadayatana-indicator-sound-6c5f878df812b11bfc982a7dd3512ad8b44d5943.tar.gz
ayatana-indicator-sound-6c5f878df812b11bfc982a7dd3512ad8b44d5943.tar.bz2
ayatana-indicator-sound-6c5f878df812b11bfc982a7dd3512ad8b44d5943.zip
Adding systemd user session unit
Approved by: Martin Pitt
-rw-r--r--data/CMakeLists.txt32
-rw-r--r--data/indicator-sound.override1
-rw-r--r--data/indicator-sound.service.in8
-rw-r--r--debian/control2
4 files changed, 43 insertions, 0 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 955a4a4..9bee68b 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -17,6 +17,38 @@ install(
)
###########################
+# Systemd Job
+###########################
+
+# where to install
+# Uncomment when we drop Vivid
+# pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)
+set (SYSTEMD_USER_DIR "/usr/lib/systemd/user")
+message (STATUS "${SYSTEMD_USER_DIR} is the systemd user unit file install dir")
+
+set (SYSTEMD_USER_NAME "${CMAKE_PROJECT_NAME}.service")
+set (SYSTEMD_USER_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SYSTEMD_USER_NAME}")
+set (SYSTEMD_USER_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SYSTEMD_USER_NAME}.in")
+
+# build it
+set (pkglibexecdir "${CMAKE_INSTALL_FULL_PKGLIBEXECDIR}")
+configure_file ("${SYSTEMD_USER_FILE_IN}" "${SYSTEMD_USER_FILE}")
+
+# install it
+install (FILES "${SYSTEMD_USER_FILE}"
+ DESTINATION "${SYSTEMD_USER_DIR}")
+
+###########################
+# Upstart systemd override Job File
+###########################
+
+set (UPSTART_SYSTEMD_OVERRIDE_DIR "${CMAKE_INSTALL_FULL_DATADIR}/upstart/systemd-session/upstart")
+message (STATUS "${UPSTART_SYSTEMD_OVERRIDE_DIR} is the Upstart override Job File for systemd dir")
+
+install (FILES "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.override"
+ DESTINATION "${UPSTART_SYSTEMD_OVERRIDE_DIR}")
+
+###########################
# Upstart Job
###########################
diff --git a/data/indicator-sound.override b/data/indicator-sound.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/data/indicator-sound.override
@@ -0,0 +1 @@
+manual
diff --git a/data/indicator-sound.service.in b/data/indicator-sound.service.in
new file mode 100644
index 0000000..d0f6216
--- /dev/null
+++ b/data/indicator-sound.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Indicator Sound Service
+PartOf=graphical-session.target
+After=indicators-pre.target
+
+[Service]
+ExecStart=@CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service
+Restart=on-failure
diff --git a/debian/control b/debian/control
index 270bb2a..7358c87 100644
--- a/debian/control
+++ b/debian/control
@@ -36,6 +36,7 @@ Build-Depends: debhelper (>= 9.0),
qtbase5-dev-tools,
qtdeclarative5-dev,
qtdeclarative5-dev-tools,
+ systemd,
Standards-Version: 3.9.4
Homepage: https://launchpad.net/indicator-sound
# If you aren't a member of ~indicator-applet-developers but need to upload
@@ -50,6 +51,7 @@ Depends: ${shlibs:Depends},
${misc:Depends},
pulseaudio,
gsettings-ubuntu-schemas (>= 0.0.1+14.04.20140224),
+ indicator-common,
Recommends: unity-control-center | gnome-control-center | ubuntu-system-settings | pavucontrol | mate-media,
accountsservice,
Suggests: unity-greeter-session-broadcast,