From 6e6bba7e8e27b1a62aa71e149e115fb22426e451 Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sun, 18 Jan 2015 17:24:49 +0100 Subject: [PATCH] Makefile: generate and install desktop file --- Makefile.am | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 6ece844..dcf0f73 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,8 @@ +# location of *.desktop file, usually /usr/share/applications +applicationsdir = $(datadir)/applications + +applications_DATA = mconnect.desktop + bin_PROGRAMS = mconnect noinst_PROGRAMS = test-mconn-crypt \ @@ -46,8 +51,14 @@ mconn-crypt.vapi: mconn-crypt.gi rm -f $@ vapigen --library mconn-crypt $< +# configure will expand bindir to ${exec_prefix}/bin, we want the +# whole thing, that's why mconnect.desktop is generated here and not +# in configure +do_desktop_subst = sed -e 's,[@]bindir[@],${bindir},g' +mconnect.desktop: mconnect.desktop.in + $(do_desktop_subst) < $< > $@ -BUILT_SOURCES = mconn-crypt.vapi mconn-crypt.gi +BUILT_SOURCES = mconn-crypt.vapi mconn-crypt.gi mconnect.desktop CLEANFILES = $(BUILT_SOURCES)