]> git.proxmox.com Git - mirror_zfs.git/commitdiff
spec: define _bashcompletiondir if undefined
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 11 Oct 2023 23:56:32 +0000 (16:56 -0700)
committerGitHub <noreply@github.com>
Wed, 11 Oct 2023 23:56:32 +0000 (16:56 -0700)
Always define _bashcompletiondir in the spec file to a reasonable value
when it is undefined.  Required for `rpmbuild --rebuild <srpm>`.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #15396

rpm/generic/zfs.spec.in

index 711e6c751dc0333137e87ecfb14f311d11b470b2..2e89abd0edfd5fefcd176da0b2e691271b29f71f 100644 (file)
 %endif
 %endif
 
+# Set the default _bashcompletiondir directory based on distribution.
+%if %{undefined _bashcompletiondir}
+%if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler}
+%global _bashcompletiondir    /etc/bash_completion.d
+%else
+%global _bashcompletiondir    /usr/share/bash-completion
+%endif
+%endif
+
 # Set the default dracut directory based on distribution.
 %if %{undefined _dracutdir}
 %if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler}