[jhbuild] [autotools] Make .desktop file translatable and installable



commit d4922b0026f264fe19d76356c4087013ad2c1d2f
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Jun 17 03:34:13 2009 +0200

    [autotools] Make .desktop file translatable and installable

 Makefile.am           |    7 ++++++-
 Makefile.plain        |    4 ++--
 configure.ac          |    4 +++-
 jhbuild.desktop       |    7 -------
 jhbuild.desktop.in.in |   13 +++++++++++++
 po/POTFILES.in        |    1 +
 6 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index f938e48..6e38f56 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,11 @@ endif
 PATCHES = $(wildcard $(top_srcdir)/patches/*.patch)
 MODULESETS = $(wildcard $(top_srcdir)/modulesets/*.modules) modulesets/moduleset.dtd
 
+desktopdir = $(datadir)/applications
+desktop_in_files = jhbuild.desktop.in
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+
+ INTLTOOL_DESKTOP_RULE@
 
 INTLTOOL = 			\
 	intltool-extract.in 	\
@@ -15,7 +20,7 @@ INTLTOOL = 			\
 
 EXTRA_DIST = gnome-doc-utils.make $(PATCHES) $(MODULESETS) \
 	install-check.c \
-	jhbuild.desktop $(INTLTOOL)
+	$(desktop_in_files) $(INTLTOOL)
 
 DISTCLEANFILES = 		\
 	intltool-extract 	\
diff --git a/Makefile.plain b/Makefile.plain
index 6f8185d..9d4f5e1 100644
--- a/Makefile.plain
+++ b/Makefile.plain
@@ -31,8 +31,8 @@ install: install-check
 
 	@echo "Creating $(desktopdir)/jhbuild.desktop"
 	@mkdir -p $(desktopdir)
-	@cp jhbuild.desktop $(desktopdir)
-	@echo "Exec=$(bindir)/jhbuild gui" >> $(desktopdir)/jhbuild.desktop
+	@sed "s,^_,,g;s,^Exec=.*$,Exec=$(bindir)/jhbuild gui,;s,^X-GNOME-Bugzilla-Version=.*$,," \
+		< jhbuild.desktop.in.in > $(desktopdir)/jhbuild.desktop
 
 	@[ -f $(HOME)/.jhbuildrc ]||echo "Don't forget to create ~/.jhbuildrc"
 	install -m755 install-check $(bindir)/install-check
diff --git a/configure.ac b/configure.ac
index 9faf7a7..18d4196 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,4 +46,6 @@ AC_CONFIG_FILES([
 	jhbuild/versioncontrol/Makefile
 	buildbot/Makefile
 ])
-AC_OUTPUT
+AC_OUTPUT([
+	jhbuild.desktop.in
+])
diff --git a/jhbuild.desktop.in.in b/jhbuild.desktop.in.in
new file mode 100644
index 0000000..8af766d
--- /dev/null
+++ b/jhbuild.desktop.in.in
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Type=Application
+_Name=GNOME Build Tool
+_Comment=Build GNOME modules
+Exec=jhbuild gui
+Categories=GNOME;Development;Building;
+Icon=applications-development
+Terminal=false
+StartupNotify=true
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=jhbuild
+X-GNOME-Bugzilla-Component=general
+X-GNOME-Bugzilla-Version= VERSION@
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 384388a..09339d4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,4 @@
+jhbuild.desktop.in
 jhbuild/commands/autobuild.py
 jhbuild/commands/base.py
 jhbuild/commands/bootstrap.py



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