summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-05-13 19:17:07 +0200
committerMichael Biebl <biebl@debian.org>2015-05-23 17:33:04 +0200
commit8ca4b8e2cb26567b693d3f4cb16191903f5b6f5a (patch)
tree9ebe9962139b3c6edee5d2980378d1ab88ca04f9
parente6183ed9b3b5a97ce650c68df5dcb85013b2c48b (diff)
downloadtracker-8ca4b8e2cb26567b693d3f4cb16191903f5b6f5a.tar.gz
Move bash-completion to new location
Rename the bash completion script after the binary and move it to /usr/share/bash-completion/completions. This way the completions can be loaded on demand.
-rw-r--r--configure.ac13
-rw-r--r--src/tracker/Makefile.am6
-rw-r--r--src/tracker/bash-completion/tracker (renamed from src/tracker/tracker-prompt.sh)0
3 files changed, 16 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 17a70daa7..b2e3ae8ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -848,6 +848,19 @@ AM_CONDITIONAL(HAVE_BUILTIN_FTS, test "$have_builtin_fts4" = "yes")
AM_CONDITIONAL(HAVE_TRACKER_FTS, test "$have_tracker_fts" = "yes")
####################################################################
+# bash-completion
+####################################################################
+AC_ARG_WITH([bashcompletiondir],
+ AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
+ [],
+ [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
+ with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
+ ] , [
+ with_bashcompletiondir=${datadir}/bash-completion/completions
+ ])])
+AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
+
+####################################################################
# Check for D-Bus requirements
####################################################################
diff --git a/src/tracker/Makefile.am b/src/tracker/Makefile.am
index 5815a7c3b..27e6e9654 100644
--- a/src/tracker/Makefile.am
+++ b/src/tracker/Makefile.am
@@ -76,11 +76,11 @@ uninstall-hook:
$(RM) "$(DESTDIR)$(bindir)/tracker-tag"
# Bash completion
-completiondir = $(sysconfdir)/bash_completion.d
-completion_DATA = tracker-prompt.sh
+bashcompletiondir = @bashcompletiondir@
+bashcompletion_DATA = bash-completion/tracker
tracker-compat: tracker-compat.in
$(AM_V_at)sed -e "s|@bindir[@]|${bindir}|" $< > $@
-EXTRA_DIST = $(completion_DATA) tracker-compat.in
+EXTRA_DIST = $(bashcompletion_DATA) tracker-compat.in
CLEANFILES = tracker-compat
diff --git a/src/tracker/tracker-prompt.sh b/src/tracker/bash-completion/tracker
index 8022b6a66..8022b6a66 100644
--- a/src/tracker/tracker-prompt.sh
+++ b/src/tracker/bash-completion/tracker