bash-completion/bash-completion.spec
2019-12-13 15:06:21 +08:00

119 lines
3.2 KiB
RPMSpec

#solve build failure with .py files
%define _python_bytecompile_errors_terminate_build 0
Name: bash-completion
Version: 2.8
Release: 9
Epoch: 1
Summary: Completion for bash command
License: GPLv2+
URL: https://github.com/scop/bash-completion
Source0: https://github.com/scop/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz
Patch0: %{name}-1.99-noblacklist.patch
Patch6000:0001-completions-Makefile-Fix-check-local-in-VPATH-builds.patch
Patch6001:0056-__load_completion-Avoid-bad-array-subscript-on-comma.patch
Patch6002:0059-_xspecs-Declare-as-global-on-bash-4.2.patch
Patch6003:0069-completions-Makefile.am-Use-install-data-hook-not-in.patch
Patch6004:0313-man-Fix-completion-when-failglob-option-is-enabled-2.patch
Patch6005:0352-_longopt-don-t-complete-no-with-file-dirname-arg.patch
Patch6006:0076-ssh-fix-suboption-completion-with-combined-o.patch
Patch6007:0137-badblocks-fix-i-leak.patch
BuildArch: noarch
BuildRequires: gcc autoconf automake
#for test
BuildRequires: dejagnu tcllib python3-pytest >= 3.6
Requires: bash >= 4.1
%description
%{name} is a collection of shell funcionts that can be
used to complete the command of bash.
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
autoreconf -fiv
%configure
%make_build
#copy _filedir in bash_completion to bash_completion.d as this function
#may conflicts with Adobe Reader
sed -ne '/^_filedir\s*(/,/^}/p' bash_completion >>copy_of__filedir
%install
%make_install
install -Dp copy_of__filedir %{buildroot}%{_sysconfdir}/bash_completion.d/copy_of__filedir
%check
export LANG=en_US.UTF-8
make -C completions check
%files
%defattr(-,root,root)
%license COPYING
%doc AUTHORS
%exclude %{_datadir}/%{name}/completions/cow*
%config(noreplace) %{_sysconfdir}/profile.d/*.sh
%{_sysconfdir}/bash_completion.d/*
%{_datadir}/%{name}/*
%{_datadir}/cmake/*
%{_datadir}/pkgconfig/%{name}.pc
%files help
%defattr(-,root,root)
%doc CHANGES README.md doc/bash_completion.txt CONTRIBUTING.md
%changelog
* Fri Nov 8 2019 shenyangyang<shenyangyang4@huawei.com> - 1:2.8-9
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:modify license
* Fri Sep 20 2019 shenyangyang<shenyangyang4@huawei.com> - 1:2.8-8
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:remove a patch
* Sat Aug 31 2019 shenyangyang<shenyangyang4@huawei.com> - 1:2.8-7
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:revise spec
* Tue Aug 20 2019 yaokai<yaokai13@huawei.com> - 1:2.8-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:rename patches
* Tue Jul 09 2019 zhangyujing<zhangyujing1@huawei.com> - 1:2.8-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: backport some bugfix from community
* Tue Apr 16 2019 yuejiayan<yuejiayan@huawei.com> - 1:2.8-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:completions/Makefile: Fix check-local in VPATH builds
__load_completion: Avoid bad array subscript on "commands" ending wit…
_xspecs: Declare as global on bash >= 4.2
completions/Makefile.am: Use install-data-hook, not install-data-local
man: Fix completion when failglob option is enabled (#225)
_longopt: don't complete --no-* with file/dirname arg
* Thu Aug 30 2018 openEuler Buildteam <buildteam@openeuler.org> - 1:2.8-3
- Package init