aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am35
-rw-r--r--data/indicator-printers.conf.in12
-rw-r--r--data/indicator-printers.desktop.in8
-rw-r--r--data/indicator-printers.service.in3
-rw-r--r--data/upstart/Makefile.am17
-rw-r--r--data/upstart/indicator-printers.desktop.in9
6 files changed, 75 insertions, 9 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 133a853..51ed2dd 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,11 +1,34 @@
-dbus_servicesdir = $(DBUSSERVICEDIR)
-dbus_services_DATA = indicator-printers.service
+BUILT_SOURCES=
+CLEANFILES=
+EXTRA_DIST=
-%.service: %.service.in
- sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
+SUBDIRS = upstart
-EXTRA_DIST = indicator-printers.service.in
+#
+# the upstart job file
+#
+
+upstart_jobsdir = $(datadir)/upstart/sessions
+upstart_jobs_DATA = indicator-printers.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 += $(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-printers.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)
-CLEANFILES = $(dbus_services_DATA)
diff --git a/data/indicator-printers.conf.in b/data/indicator-printers.conf.in
new file mode 100644
index 0000000..3e892fb
--- /dev/null
+++ b/data/indicator-printers.conf.in
@@ -0,0 +1,12 @@
+description "Indicator Printers Service"
+
+# NOTE: Limiting only to Unity 7 right now as it's still using
+# dbusmenu. That can be lifted after it is ported to GMenu
+
+start on indicator-services-start and xsession SESSION=ubuntu
+stop on desktop-end or indicator-services-end
+
+respawn
+respawn limit 2 10
+
+exec @pkglibexecdir@/indicator-printers-service
diff --git a/data/indicator-printers.desktop.in b/data/indicator-printers.desktop.in
new file mode 100644
index 0000000..a4b6908
--- /dev/null
+++ b/data/indicator-printers.desktop.in
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Printers
+Exec=@pkglibexecdir@/indicator-printers-service
+OnlyShowIn=Unity;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
diff --git a/data/indicator-printers.service.in b/data/indicator-printers.service.in
deleted file mode 100644
index d89bcd2..0000000
--- a/data/indicator-printers.service.in
+++ /dev/null
@@ -1,3 +0,0 @@
-[D-BUS Service]
-Name=com.canonical.indicator.printers
-Exec=@libexecdir@/indicator-printers-service
diff --git a/data/upstart/Makefile.am b/data/upstart/Makefile.am
new file mode 100644
index 0000000..8eb41e9
--- /dev/null
+++ b/data/upstart/Makefile.am
@@ -0,0 +1,17 @@
+BUILT_SOURCES=
+CLEANFILES=
+EXTRA_DIST=
+
+#
+# the upstart xdg autostart override
+#
+
+xdg_autostartdir = $(datadir)/upstart/xdg/autostart
+xdg_autostart_DATA = indicator-printers.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)
+
diff --git a/data/upstart/indicator-printers.desktop.in b/data/upstart/indicator-printers.desktop.in
new file mode 100644
index 0000000..8c011a9
--- /dev/null
+++ b/data/upstart/indicator-printers.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Indicator Printers
+Exec=@pkglibexecdir@/indicator-printers-service
+OnlyShowIn=Unity;
+NoDisplay=true
+StartupNotify=false
+Terminal=false
+Hidden=true