[sound-juicer] Add a dbus service file



commit 68c9c34e50d32fc4a951e017500345d958721506
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Thu Jan 26 11:10:30 2017 +0000

    Add a dbus service file
    
    Add a service file so we can use dbus application launching¹
    
    ¹ https://wiki.gnome.org/HowDoI/DBusApplicationLaunching
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777785

 data/Makefile.am |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 9f368b7..bd8b545 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,3 +1,4 @@
+appid=org.gnome.SoundJuicer
 desktopdir = $(datadir)/applications
 desktop_in_files = data/sound-juicer.desktop.in.in
 desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
@@ -8,6 +9,15 @@ $(desktop_DATA): data/sound-juicer.desktop.in
                --keyword=GenericName --keyword=Comment --keyword=Keywords   \
                --template $< -d $(top_srcdir)/po -o $@
 
+dbusservicedir = $(datadir)/dbus-1/services
+dbusservice_DATA = $(appid).service
+
+$(dbusservice_DATA): Makefile
+       $(AM_V_GEN) printf '[D-BUS Service]\nName=%s\nExec=%s'      \
+       "$(appid)"                                                  \
+       "$(bindir)/sound-juicer --gapplication-service" > $@.tmp && \
+       mv $@.tmp $@
+
 DISTCHECK_CONFIGURE_FLAGS += --enable-appstream-util
 @APPSTREAM_XML_RULES@
 appstream_XML = $(appstream_in_files:.xml.in=.xml)
@@ -80,6 +90,7 @@ uninstall-local: uninstall-icons
 uninstall-hook: update-icon-cache
 
 CLEANFILES += \
+       $(dbusservice_DATA) \
        $(desktop_DATA) \
        $(appstream_XML)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]