[glom] Add .desktop and DBus .service files for Maemo 5



commit 3ed10d14e8bc40b9b0f9a3fe04110952c1092b9b
Author: David King <davidk openismus com>
Date:   Wed Oct 28 15:58:03 2009 +0100

    Add .desktop and DBus .service files for Maemo 5
    
    * configure.ac:
    * Makefile.am:
    * glom.desktop.in.in:
    * glom.service.in: Add DBus service file for Maemo 5, and install to
    the correct location as determined by the osso-af-settings pkg-config
    file. Adjust the installation location of the glom.desktop file on
    Maemo.

 ChangeLog          |   10 ++++++++++
 Makefile.am        |   19 +++++++++++++++++--
 configure.ac       |    4 +++-
 glom.desktop.in.in |    1 +
 glom.service.in    |    3 +++
 5 files changed, 34 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index acf43c6..bd6adbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-28  David King  <davidk openismus com>
+
+	* configure.ac:
+	* Makefile.am:
+	* glom.desktop.in.in:
+	* glom.service.in: Add DBus service file for Maemo 5, and install to
+	the correct location as determined by the osso-af-settings pkg-config
+	file. Adjust the installation location of the glom.desktop file on
+	Maemo.
+
 2009-10-28  Murray Cumming  <murrayc murrayc com>
 
 	Do not mark an empty string for translation.
diff --git a/Makefile.am b/Makefile.am
index 9b2c832..8fe4d83 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -127,14 +127,29 @@ dist_pixmap_DATA =				\
 	icons/16x16/glom-related-records.png	\
 	icons/16x16/glom-text.png
 
+if GLOM_ENABLE_MAEMO
+desktopdir = $(OSSO_DESKTOPDIR)
+dbusservicedir = $(OSSO_SERVICEDIR)
+glom.service: Makefile
+	$(AM_V_at)rm -f $@ $  tmp
+	$(AM_V_at)srcdir=''; \
+	       test -f ./$  in || srcdir=$(srcdir)/; \
+	       sed -e 's|@bindir[ ]|$(bindir)|g' $${srcdir}$  in >$  tmp
+	$(AM_V_GEN)mv $  tmp $@
+
+glom.service: $(srcdir)/glom.service.in
+dbusservice_DATA = glom.service
+else
 desktopdir = $(datadir)/applications
+endif
 desktop_DATA = glom.desktop
 
 mimedir = $(datadir)/mime
 mimepackagesdir = $(mimedir)/packages
 dist_mimepackages_DATA = glom.xml
 
-dist_template = glom/glom.rc glom/utility_widgets/egg/util/eggmarshalers.list
+dist_template = glom/glom.rc glom/utility_widgets/egg/util/eggmarshalers.list \
+                glom.service.in
 dist_docutils = gnome-doc-utils.make omf.make xmldocs.make
 dist_intltool = intltool-extract.in intltool-merge.in intltool-update.in
 dist_docfiles = docs/overview.txt docs/developer_documentation.txt \
@@ -144,7 +159,7 @@ dist_noinst_DATA = $(dist_template) $(noinst_icons) $(dist_docutils) \
 		   $(dist_intltool) $(dist_docfiles)
 dist_noinst_SCRIPTS = autogen.sh win32/build-installer
 
-CLEANFILES = $(desktop_DATA) $(win_resfile)
+CLEANFILES = $(dbusservice_DATA) $(desktop_DATA) $(win_resfile)
 DISTCLEANFILES = intltool-extract intltool-merge intltool-update
 MAINTAINERCLEANFILES = \
 	$(dist_docutils) $(dist_intltool) \
diff --git a/configure.ac b/configure.ac
index 248397e..7f5d313 100644
--- a/configure.ac
+++ b/configure.ac
@@ -162,7 +162,9 @@ AS_IF([test "x$glom_enable_client_only" != xyes],
 AS_IF([test "x$glom_enable_sqlite" = xyes],
       [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS libgda-sqlite-4.0"])
 AS_IF([test "x$glom_enable_maemo" = xyes],
-      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS hildonmm hildon-fmmm"])
+      [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS hildonmm hildon-fmmm osso-af-settings"
+      MM_PKG_CONFIG_SUBST([OSSO_SERVICEDIR], [--variable=dbusservicedir osso-af-settings])
+      MM_PKG_CONFIG_SUBST([OSSO_DESKTOPDIR], [--variable=desktopentrydir osso-af-settings])])
 AS_IF([test "x$glom_maemo_launcher" = xyes],
       [REQUIRED_GLOM_LIBS="$REQUIRED_GLOM_LIBS maemo-launcher-app"])
 
diff --git a/glom.desktop.in.in b/glom.desktop.in.in
index 79590ad..410920c 100644
--- a/glom.desktop.in.in
+++ b/glom.desktop.in.in
@@ -13,3 +13,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=glom
 X-GNOME-Bugzilla-Component=general
 X-GNOME-Bugzilla-Version= VERSION@
+X-Osso-Service=org.maemo.glom
diff --git a/glom.service.in b/glom.service.in
new file mode 100644
index 0000000..97a682e
--- /dev/null
+++ b/glom.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.maemo.glom
+Exec= bindir@/glom



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