Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 17139ae573e3df9f951beca778113be5 > files > 3

bash-completion-2.0-2.mga3.src.rpm

%define name    bash-completion
%define version 2.0
%define release %mkrel 2

Name:       %{name}
Version:    %{version}
Release:    %{release}
Epoch:      2
Summary:    Programmable completion for bash
Group:      Shells
License:    GPL
URL:        http://bash-completion.alioth.debian.org/
Source0:    http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2
# ~/.bash_completion is used for completion variables setting, it has
# to be sourced from profile scriptlet instead of completion code itself
Patch10:    bash-completion-1.99-disable-user-completion.patch
BuildArch:  noarch

%description
bash-completion is a collection of shell functions that take advantage of
the programmable completion feature of bash.

%prep
%setup -q
%patch10 -p 1

%build
%configure2_5x
%make

%install
rm -rf %{buildroot}
%makeinstall_std

chmod 644 %{buildroot}%_datadir/bash-completion/bash_completion

# adapt installation
rm -f %{buildroot}%_sysconfdir/profile.d/bash_completion.sh

mkdir -p %{buildroot}%_sysconfdir/profile.d/
cat <<'EOF' >> %{buildroot}%_sysconfdir/profile.d/20bash-completion.sh
# Check for interactive bash and that we haven't already been sourced.
if [ -z "$BASH_VERSION" -o -z "$PS1" -o -n "$BASH_COMPLETION_COMPAT_DIR" ]; then
    return
fi

# source system wide config file
. %_sysconfdir/sysconfig/bash-completion

# source user config file if available,
if [ -f $HOME/.bash_completion ]; then
    . $HOME/.bash_completion
fi

if [ -n "$ENABLE_BASH_COMPLETION" ]; then
    . %_datadir/bash-completion/bash_completion
fi
EOF

mkdir -p %{buildroot}%_sysconfdir/sysconfig
cat <<'EOF' >> %{buildroot}%_sysconfdir/sysconfig/bash-completion
# bash completion global configuration

# enable bash completion
ENABLE_BASH_COMPLETION=1
# enable remote cvs completion
COMP_CVS_REMOTE=
# enable configure arguments completion
COMP_CONFIGURE_HINTS=
# enable tar archive internal path completion
COMP_TAR_INTERNAL_PATHS=
# enable wireless uid completion
COMP_IWLIST_SCAN=
# enable zeroconf hostnames completion
COMP_KNOWN_HOSTS_WITH_AVAHI=
# enable hostfile hostnames completion
COMP_KNOWN_HOSTS_WITH_HOSTFILE=1
EOF

mkdir -p %{buildroot}%_sysconfdir/skel
cat <<'EOF' >> %{buildroot}%_sysconfdir/skel/.bash_completion
# bash completion local configuration

# enable bash completion
#ENABLE_BASH_COMPLETION=1
# enable remote cvs completion
#COMP_CVS_REMOTE=
# enable configure arguments completion
#COMP_CONFIGURE_HINTS=
# enable tar archive internal path completion
#COMP_TAR_INTERNAL_PATHS=
# enable wireless uid completion
#COMP_IWCONFIG_SCAN=
# enable zeroconf hostnames completion
#COMP_AVAHI_BROWSE=
EOF

cat > README.install.urpmi <<EOF
Mageia RPM specific notes

Programmable bash completion is enabled by default. These settings can be
changed system-wide in /etc/sysconfig/bash-completion. Users may override these
settings in their ~/.bash_completion files. New users get a skeleton
configuration file automatically, while existing users can copy
/etc/skel/.bash_completion into their home directories if they want to edit
their completion settings.
EOF

%triggerpostun -- bash-completion < 2:1.90-3.mga2
# drop dangling symlinks resulting from previous setup
find %{_sysconfdir}/bash_completion.d -type l | xargs rm -f

%files
%doc README README.*.urpmi
%{_sysconfdir}/profile.d/20bash-completion.sh
%{_datadir}/bash-completion
%{_datadir}/pkgconfig/bash-completion.pc
%config(noreplace) %{_sysconfdir}/sysconfig/bash-completion
%config(noreplace) %{_sysconfdir}/skel/.bash_completion


%changelog

* Fri Jan 11 2013 umeabot <umeabot> 2:2.0-2.mga3
+ Revision: 346873
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Dec 15 2012 shlomif <shlomif> 2:2.0-1.mga3
+ Revision: 331064
- Restored the Epoch to 2, as a lower Epoch cannot be installed.
  Don't know why it was lowered to 1.

  + guillomovitch <guillomovitch>
    - 2.0 final

* Mon Jan 09 2012 guillomovitch <guillomovitch> 2:1.99-1.mga2
+ Revision: 193924
- new version

* Sun Dec 18 2011 doktor5000 <doktor5000> 2:1.90-5.mga2
+ Revision: 183875
- really fix XV EPS completion properly this time (mga#3329)

  + shlomif <shlomif>
    - SPEC cleanup - convert all tabs to spaces

* Fri Dec 16 2011 shlomif <shlomif> 2:1.90-4.mga2
+ Revision: 182495
- Bump the release to 4
- Add a fix for the xv EPS completion - https://bugs.mageia.org/show_bug.cgi?id=3329

* Thu Dec 08 2011 blino <blino> 2:1.90-3.mga2
+ Revision: 179336
- fix path in trigger script

* Sat Nov 26 2011 guillomovitch <guillomovitch> 2:1.90-2.mga2
+ Revision: 172320
- fix upgrade trigger (thanks Anssi)

* Sun Nov 06 2011 guillomovitch <guillomovitch> 2:1.90-1.mga2
+ Revision: 164312
- new version
- drop scp and rpm completion switch patches

* Mon Feb 28 2011 ahmad <ahmad> 2:1.3-2.mga1
+ Revision: 61773
- add patch to adjust helpers dir location to the modified layout we use (Fedora)

* Mon Feb 07 2011 ahmad <ahmad> 2:1.3-1.mga1
+ Revision: 48765
- sync with bash-completion-1.3-1.src.rpm from Mandriva:
  o revert to stable release instead of snapshots, bumping epoch for this
  o fix scp-remote-completion patch
  o fix some triggers

* Tue Jan 11 2011 blino <blino> 1:2.0-0.20101219.1.mga1
+ Revision: 5654
- remove hardcoded distro name
- imported package bash-completion