[gnome-font-viewer] build: Place D-Bus service in its own file



commit 08d1f19fbcf236b44805642672c5cf669f0a65aa
Author: Jeremy Bicha <jbicha ubuntu com>
Date:   Fri Jun 9 18:25:54 2017 -0400

    build: Place D-Bus service in its own file
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783613

 src/Makefile.am                      |   13 +++++++------
 src/org.gnome.font-viewer.service.in |    3 +++
 2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ea7b0ed..9c59ac7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -54,13 +54,13 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
        $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
 dbusservicedir = $(datadir)/dbus-1/services
-dbusservice_DATA = org.gnome.font-viewer.service
+dbusservice_in_files = org.gnome.font-viewer.service.in
+dbusservice_DATA = $(service_in_files:.service.in=.service)
 
-org.gnome.font-viewer.service: Makefile
-       $(AM_V_GEN) (echo '[D-BUS Service]'; \
-                    echo 'Name=org.gnome.font-viewer'; \
-                    echo 'Exec=${bindir}/gnome-font-viewer --gapplication-service') > $@.tmp && \
-                    mv $@.tmp $@
+org.gnome.font-viewer.service: org.gnome.font-viewer.service.in
+       $(AM_V_GEN)     \
+               [ -d $(@D) ] || $(mkdir_p) $(@D) ; \
+               sed -e "s|\@bindir\@|$(bindir)|" $< > $@.tmp && mv $@.tmp $@
 
 thumbnailerdir = $(datadir)/thumbnailers
 thumbnailer_DATA = gnome-font-viewer.thumbnailer
@@ -79,6 +79,7 @@ CLEANFILES = \
 EXTRA_DIST = \
        $(desktop_in_files) \
        $(resource_files) \
+       $(dbusservice_in_files) \
        gnome-font-viewer.thumbnailer \
        gnome-font-viewer.gresource.xml
 
diff --git a/src/org.gnome.font-viewer.service.in b/src/org.gnome.font-viewer.service.in
new file mode 100644
index 0000000..d8c89a3
--- /dev/null
+++ b/src/org.gnome.font-viewer.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.font-viewer
+Exec=@bindir@/gnome-font-viewer --gapplication-service


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