aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@ubuntu.com>2017-05-17 10:15:49 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-05-17 10:15:49 +0200
commit3db7888c6309a00148e26620814f8942993981a1 (patch)
tree9bd07d56735064084c1518a4369cbe9b2371330c
parent23d89e9096509c6e086b3c314511850aa372d1da (diff)
downloadayatana-indicator-session-3db7888c6309a00148e26620814f8942993981a1.tar.gz
ayatana-indicator-session-3db7888c6309a00148e26620814f8942993981a1.tar.bz2
ayatana-indicator-session-3db7888c6309a00148e26620814f8942993981a1.zip
Adding a systemd user session unit
-rw-r--r--data/CMakeLists.txt31
-rw-r--r--data/ayatana-indicator-session.override1
-rw-r--r--data/ayatana-indicator-session.service.in8
-rw-r--r--debian/control2
4 files changed, 42 insertions, 0 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 395ffb2..f3feeff 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -15,6 +15,37 @@ execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translati
# let UseGSettings do the rest
add_schema (${SCHEMA_FILE})
+##
+## Systemd Unit File
+##
+
+# 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 Config File
diff --git a/data/ayatana-indicator-session.override b/data/ayatana-indicator-session.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/data/ayatana-indicator-session.override
@@ -0,0 +1 @@
+manual
diff --git a/data/ayatana-indicator-session.service.in b/data/ayatana-indicator-session.service.in
new file mode 100644
index 0000000..6ec2776
--- /dev/null
+++ b/data/ayatana-indicator-session.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Ayatana Indicator Session Service
+PartOf=graphical-session.target
+After=ayatana-indicators-pre.target
+
+[Service]
+ExecStart=@pkglibexecdir@/ayatana-indicator-session-service
+Restart=on-failure
diff --git a/debian/control b/debian/control
index 9d376d8..f5cfe3c 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,7 @@ Build-Depends: cmake,
libglib2.0-dev (>= 2.36),
libgtest-dev,
python,
+ systemd,
Standards-Version: 3.9.6
Homepage: https://github.com/ArcticaProject/ayatana-indicator-session
Vcs-Git: git://cgit.arctica-project.org/ayatana/ayatana-indicator-session.git
@@ -21,6 +22,7 @@ Depends: ${shlibs:Depends},
systemd,
gnome-settings-daemon,
gsettings-desktop-schemas,
+ ayatana-indicator-common,
Recommends: indicator-applet (>= 0.2) | mate-indicator-applet | indicator-renderer,
gnome-screensaver | mate-screensaver,
yelp,