X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=bash-completion.spec;h=85b79581186623c2d1a95a5d23917a19f87595b2;hb=706d401503dc978482a8af2e60f7cc685dfe4ccc;hp=8c68501a791285dd9e60df5a4bc856028e946929;hpb=2dae17ed1734b5ec61efde374032bd4c6c4a15a0;p=packages%2Fbash-completion.git diff --git a/bash-completion.spec b/bash-completion.spec index 8c68501..85b7958 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,71 +1,76 @@ Summary: bash-completion offers programmable completion for bash -Summary(pl): Programowalne uzupe³nianie nazw dla basha +Summary(pl.UTF-8): Programowalne uzupełnianie nazw dla basha Name: bash-completion -Version: 20031125 -Release: 1 +Version: 20060301 +Release: 3 License: GPL Group: Applications/Shells Source0: http://www.caliban.org/files/bash/%{name}-%{version}.tar.bz2 -# Source0-md5: 56a19bf89972f2d6e129933e7d76d626 +# Source0-md5: ed95a89f57357a42b8e4eb95487bf9d0 +Source1: %{name}-poldek.sh +Source2: %{name}.sh +Patch0: %{name}-rpm-cache.patch +Patch1: %{name}-rpm-arch.patch +Patch2: %{name}-FHS.patch +Patch3: %{name}-mplayer.patch URL: http://www.caliban.org/bash/ -Requires(post,preun): bash -Requires(post): grep -Requires(post): textutils -Requires(postun): fileutils -Requires(postun): sed -BuildArch: noarch +Requires(triggerpostun): sed >= 4.0 Requires: bash >= 2.05a-3 +Obsoletes: bash-completion-rpm-cache +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ñ. +%description -l pl.UTF-8 +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ń. %prep %setup -q -n bash_completion +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d +install -d $RPM_BUILD_ROOT{%{_sysconfdir}/bash_completion.d,/etc/shrc.d,/var/cache} install bash_completion $RPM_BUILD_ROOT%{_sysconfdir} -install contrib/* $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d +install contrib/* $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d +> $RPM_BUILD_ROOT/var/cache/rpmpkgs.txt +install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d/poldek +install %{SOURCE2} $RPM_BUILD_ROOT/etc/shrc.d %clean rm -rf $RPM_BUILD_ROOT %post -if ! grep -q '\[ -f '%{_sysconfdir}'/bash_completion \]' \ - %{_sysconfdir}/bashrc 2>/dev/null; then - umask 022 - cat <<'EOF' >> %{_sysconfdir}/bashrc -# START bash completion -- do not remove this line -bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} -if [ "$PS1" ] && [ "$bmajor" -eq 2 ] && [ "$bminor" '>' 04 ] \ - && [ -f %{_sysconfdir}/bash_completion ]; then # interactive shell - # Source completion code - . %{_sysconfdir}/bash_completion -fi -unset bash bmajor bminor -# END bash completion -- do not remove this line -EOF -fi +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 -%postun -if [ "$1" -eq 0 ]; then - umask 022 - sed -e '/^# START bash completion/,/^# END bash completion/d' /etc/bashrc \ - > /etc/bashrc.tmp - mv -f /etc/bashrc.tmp /etc/bashrc + # rpm binary check for vservers + if [ -x /bin/rpm ]; then + export LC_ALL=C + rpm -qa --qf '%%{name}-%%{version}-%%{release}.%%{arch}.rpm\n' 2>&1 | sort > /var/cache/rpmpkgs.txt + fi fi +%triggerpostun -- %{name} < 20050721-3.9 +sed -i -e '/^# START bash completion/,/^# END bash completion/d' /etc/bashrc +chown root:wheel /var/cache/rpmpkgs.txt +chmod 664 /var/cache/rpmpkgs.txt + %files %defattr(644,root,root,755) %doc README Changelog BUGS %{_sysconfdir}/bash_completion -%{_sysconfdir}/bash_completion.d/ +%{_sysconfdir}/bash_completion.d +/etc/shrc.d/%{name}.sh +%ghost %attr(664,root,wheel) /var/cache/rpmpkgs.txt