X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=bash-completion.spec;h=445c04c95d987f397dcaa0782419f0de1bc93d86;hb=903a151ec9b9a76dd2f79f7f4cf7804ac4aeb42c;hp=7c1c3166031ac20c954729ef2086956e2c8a031a;hpb=ee5644f9884d43892a7685cca906dd9371a3ba2e;p=packages%2Fbash-completion.git diff --git a/bash-completion.spec b/bash-completion.spec index 7c1c316..445c04c 100644 --- a/bash-completion.spec +++ b/bash-completion.spec @@ -1,13 +1,16 @@ Summary: bash-completion offers programmable completion for bash Summary(pl): Programowalne uzupeĀ³nianie nazw dla basha Name: bash-completion -Version: 20020519 +Version: 20030501 Release: 1 License: GPL Group: Applications/Shells Source0: http://www.caliban.org/files/bash/%{name}-%{version}.tar.bz2 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: bash >= 2.05a-3 @@ -31,21 +34,20 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d install bash_completion $RPM_BUILD_ROOT%{_sysconfdir} -gzip -9nf README Changelog - %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 + . %{_sysconfdir}/bash_completion fi unset bash bmajor bminor # END bash completion -- do not remove this line @@ -54,6 +56,7 @@ fi %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 @@ -61,6 +64,6 @@ fi %files %defattr(644,root,root,755) -%doc *.gz contrib/ +%doc README Changelog contrib %{_sysconfdir}/bash_completion -%dir %{_sysconfdir}/bash_completion.d/ +%dir %{_sysconfdir}/bash_completion.d