Fix the default install path for bash-completion if the package is
not installed at build time. This avoids BASH_COMPLETION_DIR being
badly formatted in the lustre.spec file.
Lustre-change: https://review.whamcloud.com/38548
Fixes:
dfb4afc24102 ("LU-13225 utils: bash completion for lfs and lctl")
Test-Parameters: trivial
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ie50071c4ff86f57bc9dd53409ae339da2a3ebbe5
Reviewed-on: https://review.whamcloud.com/38670
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
%{_mandir}/man?/*
%endif
%{_datadir}/lustre
-%{_datadir}/bash-completion/completions/*
+@BASH_COMPLETION_DIR@
%{_includedir}/lustre
%{_includedir}/linux/lnet
%{_includedir}/linux/lustre
AS_IF([test "x$with_bash_completion_dir" = "xyes"], [
BASH_COMPLETION_DIR="`pkg-config --variable=completionsdir bash-completion`"
AS_IF([test "x$BASH_COMPLETION_DIR" = "x"], [
- [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]
+ [BASH_COMPLETION_DIR="/usr/share/bash-completion/completions"]
])
], [
BASH_COMPLETION_DIR="$with_bash_completion_dir"