Summary: bash-completion offers programmable completion for bash Summary(pl): Programowalne uzupełnianie nazw dla basha Name: bash-completion Version: 20050721 Release: 3.3 License: GPL Group: Applications/Shells Source0: http://www.caliban.org/files/bash/%{name}-%{version}.tar.bz2 # Source0-md5: 4de9f0dee0663f08b5e24f64490e642e Source1: %{name}.cron Source2: %{name}-poldek.sh Patch0: %{name}-FHS.patch Patch1: %{name}-ifcfg.patch Patch2: %{name}-known_hosts.patch Patch3: %{name}-rpm-arch.patch URL: http://www.caliban.org/bash/ Requires(triggerpostun): sed >= 4.0 Requires: bash >= 2.05a-3 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description bash-completion is a collection of shell functions that take advantage of the programmable completion feature of bash 2.04 and later. %description -l pl bash-completion jest kolekcją funkcji shella, które opierają się na wbudowanych rozszerzeniach basha 2.04 lub późniejszego umożliwiającego kompletowanie parametrów linii poleceń. %package rpm-cache Summary: Cache result of rpm -qa Summary(pl): Buforowanie wyniku rpm -qa Group: Applications/Shells %description rpm-cache This package contains cached version of rpm -qa, which is used for rpm completion for faster completion. %description rpm-cache -l pl Ten pakiet zawiera skrypt buforujący wynik rpm -qa w celu szybszego dopełniania linii poleceń programu rpm. %prep %setup -q -n bash_completion %patch0 -p1 %patch1 -p2 %patch2 -p1 %patch3 -p1 %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir}/bash_completion.d,/etc/cron.daily,/etc/shrc.d,/var/cache} install bash_completion $RPM_BUILD_ROOT%{_sysconfdir} install contrib/* $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d install %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.daily/rpmpkgs > $RPM_BUILD_ROOT/var/cache/rpmpkgs.txt install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/poldek # subversion comes with much better completion file rm $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/subversion cat <<'EOF' > %{name}.sh # check for bash [ -z "$BASH_VERSION" ] && return # must be interactive shell, not script [[ $- = *i* ]] || return # check for correct version of bash bash=${BASH_VERSION%%.*}; bmajor=${bash%%.*}; bminor=${bash#*.} if [ "$bmajor" -eq 2 -a "$bminor" '>' 04 ] || [ "$bmajor" -gt 2 ]; then if [ "$PS1" ]; then # interactive shell # Source completion code . %{_sysconfdir}/bash_completion fi fi unset bash bminor bmajor EOF install %{name}.sh $RPM_BUILD_ROOT/etc/shrc.d %clean rm -rf $RPM_BUILD_ROOT %post rpm-cache if [ ! -f /var/cache/rpmpkgs.txt ]; then touch /var/cache/rpmpkgs.txt chown root:wheel /var/cache/rpmpkgs.txt chmod 664 /var/cache/rpmpkgs.txt fi %triggerpostun -- %{name} < 20050112-1 # legacy clean-up sed -i -e '/^# START bash completion/,/^# END bash completion/d' /etc/bashrc %files %defattr(644,root,root,755) %doc README Changelog BUGS %{_sysconfdir}/bash_completion %{_sysconfdir}/bash_completion.d %attr(755,root,root) /etc/shrc.d/%{name}.sh %files rpm-cache %defattr(644,root,root,755) %attr(755,root,root) /etc/cron.daily/* %ghost %attr(664,root,wheel) /var/cache/rpmpkgs.txt