aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/CMakeLists.txt32
-rw-r--r--data/ayatana-indicator-power.override1
-rw-r--r--data/ayatana-indicator-power.service.in8
-rw-r--r--debian/control3
4 files changed, 44 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
##
diff --git a/data/ayatana-indicator-power.override b/data/ayatana-indicator-power.override
new file mode 100644
index 0000000..2905494
--- /dev/null
+++ b/data/ayatana-indicator-power.override
@@ -0,0 +1 @@
+manual
diff --git a/data/ayatana-indicator-power.service.in b/data/ayatana-indicator-power.service.in
new file mode 100644
index 0000000..90ea9e6
--- /dev/null
+++ b/data/ayatana-indicator-power.service.in
@@ -0,0 +1,8 @@
+[Unit]
+Description=Ayatana Indicator Power
+PartOf=graphical-session.target
+After=ayatana-indicators-pre.target
+
+[Service]
+ExecStart=@pkglibexecdir@/ayatana-indicator-power-service
+Restart=on-failure
diff --git a/debian/control b/debian/control
index 57fbab5..76efe4d 100644
--- a/debian/control
+++ b/debian/control
@@ -15,6 +15,8 @@ Build-Depends: cmake,
python3-dbusmock,
dbus-test-runner,
libdbustest1-dev,
+# for systemd unit
+ systemd,
Standards-Version: 3.9.8
Homepage: https://github.com/ArcticaProject/ayatana-indicator-power
Vcs-Git: git://cgit.arctica-project.org/ayatana/ayatana-indicator-power.git
@@ -24,6 +26,7 @@ Package: ayatana-indicator-power
Architecture: any
Depends: ${shlibs:Depends},
${misc:Depends},
+ indicator-common,
upower,
Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings | switchboard-plug-power | xfce4-power-manager | mate-power-manager,
indicator-applet (>= 0.2) | indicator-renderer,