fff27fb
# Expected failures in mock, hangs in koji
fff27fb
%bcond_with tests
b036887
# The *.py files we ship are not python scripts, #813651
b036887
%global _python_bytecompile_errors_terminate_build 0
fff27fb
cvsextras 05bf1d9
Name:           bash-completion
9e0d827
Version:        2.6
9e0d827
Release:        1%{?dist}
742eb98
Epoch:          1
cvsextras 05bf1d9
Summary:        Programmable completion for Bash
cvsextras 05bf1d9
77b5bf2
License:        GPLv2+
cb3caa7
URL:            https://github.com/scop/bash-completion
cb3caa7
Source0:        https://github.com/scop/bash-completion/releases/download/%{version}/%{name}-%{version}.tar.xz
7825831
# https://bugzilla.redhat.com/677446, see also redefine_filedir comments
d1d1afa
Patch0:         %{name}-1.99-noblacklist.patch
cvsextras 05bf1d9
cvsextras 05bf1d9
BuildArch:      noarch
fff27fb
%if %{with tests}
6a80f0e
BuildRequires:  dejagnu
6a80f0e
BuildRequires:  screen
6a80f0e
BuildRequires:  tcllib
fff27fb
%endif
6c1548a
Requires:       bash >= 4.1
cvsextras 05bf1d9
cvsextras 05bf1d9
%description
cvsextras 05bf1d9
bash-completion is a collection of shell functions that take advantage
6a80f0e
of the programmable completion feature of bash.
cvsextras 05bf1d9
cvsextras 05bf1d9
cvsextras 05bf1d9
%prep
742eb98
%setup -q
7ef2069
%patch0 -p1
a2a3bb8
9793c23
9793c23
%build
9793c23
%configure
6bdedcf
%make_build
9793c23
7825831
cat <<EOF >redefine_filedir
7825831
# This is a copy of the _filedir function in bash_completion, included
7825831
# and (re)defined separately here because some versions of Adobe
7825831
# Reader, if installed, are known to override this function with an
7825831
# incompatible version, causing various problems.
7825831
#
7825831
# https://bugzilla.redhat.com/677446
7825831
# http://forums.adobe.com/thread/745833
7825831
7825831
EOF
7825831
sed -ne '/^_filedir\s*(/,/^}/p' bash_completion >>redefine_filedir
7825831
9793c23
9793c23
%install
6bdedcf
%make_install
7825831
install -Dpm 644 redefine_filedir \
7825831
    $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/redefine_filedir
9793c23
6c1548a
# Updated completion shipped in cowsay package:
6c1548a
rm $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/{cowsay,cowthink}
9793c23
cvsextras 05bf1d9
6a80f0e
%check
6a80f0e
# For some tests involving non-ASCII filenames
6a80f0e
export LANG=en_US.UTF-8
227c9af
%if %{with tests}
6a80f0e
# This stuff borrowed from dejagnu-1.4.4-17 (tests need a terminal)
6a80f0e
tmpfile=$(mktemp)
6a80f0e
screen -D -m sh -c '( make check ; echo $? ) >'$tmpfile
6a80f0e
cat $tmpfile
6a80f0e
result=$(tail -n 1 $tmpfile)
6a80f0e
rm -f $tmpfile
fff27fb
exit $result
227c9af
%else
227c9af
make -C completions check
fff27fb
%endif
6a80f0e
6a80f0e
6c1548a
%files
c30b02a
%license COPYING
1412793
%doc AUTHORS CHANGES CONTRIBUTING.md README.md
cb3caa7
%doc doc/bash_completion.txt
f4e6e06
%config(noreplace) %{_sysconfdir}/profile.d/bash_completion.sh
6c1548a
%{_sysconfdir}/bash_completion.d/
6c1548a
%{_datadir}/bash-completion/
c30b02a
%{_datadir}/cmake/
6c1548a
%{_datadir}/pkgconfig/bash-completion.pc
cvsextras 05bf1d9
cvsextras 05bf1d9
cvsextras 05bf1d9
%changelog
9e0d827
* Tue Jun 27 2017 Ville Skyttä <ville.skytta@iki.fi> - 1:2.6-1
9e0d827
- Update to 2.6
9e0d827
ffaac6a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.5-2
ffaac6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ffaac6a
5cb0b43
* Sat Feb  4 2017 Ville Skyttä <ville.skytta@iki.fi> - 1:2.5-1
5cb0b43
- Update to 2.5
5cb0b43
82919f8
* Fri Aug 12 2016 Ville Skyttä <ville.skytta@iki.fi> - 1:2.4-1
82919f8
- Update to 2.4
82919f8
344ccd9
* Mon Mar 28 2016 Ville Skyttä <ville.skytta@iki.fi> - 1:2.3-1
344ccd9
- Update to 2.3
344ccd9
cb3caa7
* Thu Mar  3 2016 Ville Skyttä <ville.skytta@iki.fi> - 1:2.2-1
cb3caa7
- Update to 2.2
cb3caa7
10e04f3
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.1-9.20150513git1950590
10e04f3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
10e04f3
d5a7933
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.1-8.20150513git1950590
d5a7933
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d5a7933
7825831
* Thu May 14 2015 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-7.20150513git1950590
7825831
- Autogenerate redefine_filedir (fixes #1171396 in it too)
7825831
d069f25
* Wed May 13 2015 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-6.20150513git1950590
d069f25
- Update to current upstream git (fixes #1171396)
d069f25
- Move pre-1.90 %%changelog entries to CHANGES.package.old
d069f25
c30b02a
* Mon Nov 10 2014 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-6.20141110git52d8316
c30b02a
- Update to current upstream git (fixes #744406, #949479, #1090481, #1015935,
c30b02a
  #1132959, #1135489)
c30b02a
- Clean up no longer needed specfile conditionals
c30b02a
- Mark COPYING as %%license where applicable
c30b02a
3c8d903
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.1-5
3c8d903
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3c8d903
f4e6e06
* Tue Dec 17 2013 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-4
f4e6e06
- Ship bash_completion.txt.
f4e6e06
- Make profile.d scriptlet noreplace again.
f4e6e06
1f70fa5
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.1-3
1f70fa5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
1f70fa5
0394aa9
* Tue Apr  9 2013 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-2
0394aa9
- Don't install nmcli completion on F-18+ (#950071).
0394aa9
653669b
* Mon Apr  8 2013 Ville Skyttä <ville.skytta@iki.fi> - 1:2.1-1
653669b
- Update to 2.1 (fixes #860510, #906469, #912113, #919246, #928253).
653669b
- Don't ship completions included in util-linux 2.23-rc2 for F-19+.
653669b
e353b91
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0-3
e353b91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e353b91
1f3e95a
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:2.0-2
1f3e95a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1f3e95a
b036887
* Tue Jun 19 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:2.0-1
b036887
- Update to 2.0 (fixes #817902, #831835).
b036887
- Don't try to python-bytecompile our non-python *.py (#813651).
b036887
d1d1afa
* Sun Jan  8 2012 Ville Skyttä <ville.skytta@iki.fi> - 1:1.99-1
d1d1afa
- Update to 1.99.
d1d1afa
6c1548a
* Fri Nov  4 2011 Ville Skyttä <ville.skytta@iki.fi> - 1:1.90-1
6c1548a
- Update to 1.90.
6c1548a
- Specfile cleanups.
6c1548a
- Move pre-1.2 %%changelog entries to CHANGES.package.old.