aboutsummaryrefslogtreecommitdiff
path: root/data/CMakeLists.txt
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2017-05-15 14:59:01 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-05-15 14:59:01 +0200
commit3afc69bc70ccd16daa1c3af5a76266d8e4300ea4 (patch)
treea2cf0eb461e884903a7bf1949985ac959079993d /data/CMakeLists.txt
parentf223d5a98db5fc1505ffcd04941093856ba0b3fb (diff)
downloadayatana-indicator-power-3afc69bc70ccd16daa1c3af5a76266d8e4300ea4.tar.gz
ayatana-indicator-power-3afc69bc70ccd16daa1c3af5a76266d8e4300ea4.tar.bz2
ayatana-indicator-power-3afc69bc70ccd16daa1c3af5a76266d8e4300ea4.zip
Add systemd user session unit file
Diffstat (limited to 'data/CMakeLists.txt')
-rw-r--r--data/CMakeLists.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 0d903b9..8844326 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -15,6 +15,38 @@ execute_process (COMMAND intltool-merge -quiet --xml-style --utf8 --no-translati
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 Job File
##