bash-completion: use bash_completions_dir macro

Install the completion script with the `%{bash_completions_dir}` macro.
By default, it will be `/usr/share/bash-completion/completions`
from which the script will be dynamically sourced on use.
This commit is contained in:
Frédéric Moulins 2022-10-03 19:44:38 +02:00
parent e2863d1636
commit 3526946a41

View File

@ -985,7 +985,7 @@ find ./tests ./run-tests.sh -type f | cpio -pd %{buildroot}%{_prefix}/share/glus
## Install bash completion for cli
install -p -m 0755 -D extras/command-completion/gluster.bash \
%{buildroot}%{_sysconfdir}/bash_completion.d/gluster
%{buildroot}%{bash_completions_dir}/gluster
##-----------------------------------------------------------------------------
## All package definitions should be placed here in alphabetical order
@ -1292,7 +1292,7 @@ exit 0
%files cli
%{_sbindir}/gluster
%{_mandir}/man8/gluster.8*
%{_sysconfdir}/bash_completion.d/gluster
%{bash_completions_dir}/gluster
%files client-xlators
%dir %{_libdir}/glusterfs/%{version}%{?prereltag}/xlator/cluster