From: Jeffrey C. Ollie <jeff@ocjtech.us>
Date: Sun, 22 Nov 2009 21:17:11 +0000 (-0600)
Subject: Add install target for notmuch.desktop file.
X-Git-Tag: 0.1~137
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=1bf121924d41e57ef6fdfc14c6ebe8ce9aa3f5e1;p=obsolete%2Fnotmuch-old

Add install target for notmuch.desktop file.

Add an install target that uses desktop-file-install to install the
desktop file in the appropriate location.  The location of the install
can be modified by changing the desktop_dir variable.

Signed-off-by: Jeffrey C. Ollie <jeff@ocjtech.us>
---

diff --git a/Makefile.local b/Makefile.local
index d579242c..04bac838 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -43,6 +43,10 @@ install-emacs: install emacs
 	install -m0644 notmuch.el $(DESTDIR)$(emacs_lispdir)
 	install -m0644 notmuch.elc $(DESTDIR)$(emacs_lispdir)
 
+install-desktop:
+	install -d $(DESTDIR)$(desktop_dir)
+	desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop
+
 install-bash:
 	install -d $(DESTDIR)$(bash_completion_dir)
 	install -m0644 contrib/notmuch-completion.bash \
diff --git a/configure b/configure
index d240b6ac..a2af672d 100755
--- a/configure
+++ b/configure
@@ -274,6 +274,9 @@ prefix = ${PREFIX}
 # The directory to which emacs lisp files should be installed
 emacs_lispdir=${emacs_lispdir}
 
+# The directory to which desktop files should be installed
+desktop_dir = \${prefix}/share/applications
+
 # Whether the getline function is available (if not, then notmuch will
 # build its own version)
 HAVE_GETLINE = ${have_getline}