diff options
author | Ted Gould <ted@gould.cx> | 2013-10-31 17:59:48 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-31 17:59:48 +0000 |
commit | 7066fed66d02995377edd7fa407f1742c07d9339 (patch) | |
tree | 351da57df010679c62e33d5755560ac017b22a51 | |
parent | 1ca27d4598aff14d3b18172030fc87a7da77e264 (diff) | |
parent | 4913289a34ce6088ec06d7f32a55f0638e4c2da5 (diff) | |
download | ayatana-indicator-power-7066fed66d02995377edd7fa407f1742c07d9339.tar.gz ayatana-indicator-power-7066fed66d02995377edd7fa407f1742c07d9339.tar.bz2 ayatana-indicator-power-7066fed66d02995377edd7fa407f1742c07d9339.zip |
Switching DBus service to an Upstart Job. Fixes: https://bugs.launchpad.net/bugs/1185565.
Approved by PS Jenkins bot, Charles Kerr.
-rw-r--r-- | data/Makefile.am | 29 | ||||
-rw-r--r-- | data/indicator-power.conf.in | 11 | ||||
-rw-r--r-- | data/indicator-power.desktop.in | 9 | ||||
-rw-r--r-- | data/indicator-power.service.in | 3 |
4 files changed, 41 insertions, 11 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 68cd662..9a4caca 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -10,17 +10,30 @@ indicatorsdir = $(prefix)/share/unity/indicators dist_indicators_DATA = com.canonical.indicator.power # -# the dbus service file +# the upstart job file # -dbus_servicesdir = $(datadir)/dbus-1/services -dbus_services_DATA = indicator-power.service -dbus_services_in = $(dbus_services_DATA:.service=.service.in) -$(dbus_services_DATA): $(dbus_services_in) +upstart_jobsdir = $(datadir)/upstart/sessions +upstart_jobs_DATA = indicator-power.conf +upstart_jobs_in = $(upstart_jobs_DATA:.conf=.conf.in) +$(upstart_jobs_DATA): $(upstart_jobs_in) $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@ -BUILT_SOURCES += $(dbus_services_DATA) -CLEANFILES += $(dbus_services_DATA) -EXTRA_DIST += $(dbus_services_in) +BUILT_SOURCES += $(upstart_jobs_DATA) +CLEANFILES += $(upstart_jobs_DATA) +EXTRA_DIST += $(upstart_jobs_in) + +# +# the xdg autostart job file +# + +xdg_autostartdir = /etc/xdg/autostart +xdg_autostart_DATA = indicator-power.desktop +xdg_autostart_in = $(xdg_autostart_DATA:.desktop=.desktop.in) +$(xdg_autostart_DATA): $(xdg_autostart_in) + $(AM_V_GEN) $(SED) -e "s|\@pkglibexecdir\@|$(pkglibexecdir)|" $< > $@ +BUILT_SOURCES += $(xdg_autostart_DATA) +CLEANFILES += $(xdg_autostart_DATA) +EXTRA_DIST += $(xdg_autostart_in) # # the gettings diff --git a/data/indicator-power.conf.in b/data/indicator-power.conf.in new file mode 100644 index 0000000..a2bc7aa --- /dev/null +++ b/data/indicator-power.conf.in @@ -0,0 +1,11 @@ +description "Indicator Power 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 @pkglibexecdir@/indicator-power-service diff --git a/data/indicator-power.desktop.in b/data/indicator-power.desktop.in new file mode 100644 index 0000000..28025a2 --- /dev/null +++ b/data/indicator-power.desktop.in @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=Indicator Power +Exec=@pkglibexecdir@/indicator-power-service +NotShowIn=Unity; +NoDisplay=true +StartupNotify=false +Terminal=false + diff --git a/data/indicator-power.service.in b/data/indicator-power.service.in deleted file mode 100644 index 0702e8b..0000000 --- a/data/indicator-power.service.in +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=com.canonical.indicator.power -Exec=@pkglibexecdir@/indicator-power-service |