File bash-completion.spec of Package bash-completion

#
# spec file for package bash-completion (Version 20060301)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           bash-completion
License:        GPL v2 or later
Group:          System/Shells
Requires:       bash
AutoReqProv:    on
Version:        20060301
Release:        109
Summary:        Programmable Completion for Bash
Url:            http://www.caliban.org/bash/index.shtml#completion
Source0:        http://www.caliban.org/files/bash/bash-completion-%version.tar.bz2
%define gitcompletion_version 20061106
Source1:        git-completion-%{gitcompletion_version}.tar.bz2
Patch0:         bash_completion-rpm_install_complete.patch
Patch1:         bash-completion-bzip2_fix.patch
Patch2:         bash-completion-svn_filenames.patch
Patch3:         bash-completion-mount_dir_fix.patch
Patch4:         bash-completion-no_tilde_expansion.patch
Patch5:         bash-completion-readonly_fix.patch
Patch6:         bash-completion-speedup_rpm.patch
Patch7:         bash-completion-complete_spm.patch
Patch8:         bash-completion-cd.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

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



Authors:
--------
    Ian Macdonald <ian@caliban.org>

%prep
%setup -n bash_completion -b 1
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p2
%patch7 -p1
%patch8 -p0

%build
# empty

%install
# /etc/bash_completion.d/ is now "owned" by bash:
# install -m 755 -d $RPM_BUILD_ROOT/etc/bash_completion.d/
install -m 755 -d $RPM_BUILD_ROOT/etc/
install -m 644 bash_completion $RPM_BUILD_ROOT/etc/
install -m 755 -d $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/ \
		  $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/contrib/
install -m 644 README $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/
mkdir -p $RPM_BUILD_ROOT/etc/bash_completion.d/
install -m 644 contrib/* $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/contrib/
INSTALL="hg modules unrar"
for f in $INSTALL; do
    mv $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/contrib/$f $RPM_BUILD_ROOT/etc/bash_completion.d/
done
# git-completion
pushd ../git-completion-%{gitcompletion_version}
mkdir -p $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/git-completion/
install -m 644 * $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/git-completion/
INSTALL="git-compl git-compl-lib cg-compl"
for f in $INSTALL; do
    mv $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/git-completion/$f $RPM_BUILD_ROOT/etc/bash_completion.d/
done
rm $RPM_BUILD_ROOT/%{_defaultdocdir}/%{name}/git-completion/COPYING
popd

%files
%defattr(-,root,root)
/etc/bash_completion
# /etc/bash_completion.d/
%doc %{_defaultdocdir}/%{name}/
/etc/bash_completion.d/*

%clean
rm -rf $RPM_BUILD_ROOT

%changelog
* Tue Nov 11 2008 werner@suse.de
- Make completion for cd command smart (bnc#442827)
* Fri Sep 26 2008 mkoenig@suse.de
- fix problem with readonly vars [bnc#383486]
- speed up rpm completion [bnc#402659]
- complete on .spm [bnc#416901]
* Tue May 06 2008 mkoenig@suse.de
- remove default tilde expansion, as this should be configurable
  by the expand-tilde readline setting, even with bash-completion
  installed [bnc#386844]
* Mon May 05 2008 mkoenig@suse.de
- fix mount completion for root [bnc#386459]
* Tue Apr 22 2008 mkoenig@suse.de
- use -o filenames for svn completion [bnc#382280]
- add empty %%build section
* Fri Jun 01 2007 mkoenig@suse.de
- fix bzip2 completion to handle filenames with spaces [#278608]
* Thu Mar 08 2007 mkoenig@suse.de
- enhance rpm completion [#242123]
* Thu Feb 15 2007 mkoenig@suse.de
- add git-completion
- add %%clean target to specfile
- only install really useful completions by default
* Wed Feb 07 2007 mkoenig@suse.de
- update to version 20060301
  * There were probable bash 3.1 POSIX quote problems if
  UserKnownHostsFile or GlobalKnownHostsFile keywords were used
  inside ssh config files. Fixed.
  * Added new subversion completion implementation
  * Added minicom completion
  * --nodigest and --nosignature options must be set in $nodig and
  $nosig within _rpm_installed_packages() itself, not just set
  in _rpm() before _rpm_installed_packages() is called. This is
  because other completion functions also call
  _rpm_installed_packages().
  * Minor playmidi and timidity additions for .MID(I)
  (capital letters) files.
  * Add kdvi, dvipdf and advi to programs that complete on .dvi
  files
  * iconv completion improvement
  * Replace invoke-rc.d completion
- move useful completion files to /etc/bash_completion.d/
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Aug 02 2005 cthiel@suse.de
- Update to version 20050721.
* Mon Mar 07 2005 agruen@suse.de
- Update to version 20050121.
* Tue Sep 21 2004 agruen@suse.de
- Update to version 20040711. Drop obsolete patches.
* Mon Feb 23 2004 hmacht@suse.de
- added option # norootforbuild in specfile
* Thu Sep 18 2003 agruen@suse.de
- #30648: fix insmod tab completion regexp quoting bug.
* Wed Sep 03 2003 agruen@suse.de
- rschiele@uni-mannheim.de: bash_completion searches lsmod in
  /sbin, but it is in /bin now.
* Mon Jul 28 2003 agruen@suse.de
- Remove /etc/bash_completion.d/ directory from files list: This
  directory is now "owned" by bash. (We still must create an
  /etc directory in the build root, though.)
* Fri Jul 25 2003 agruen@suse.de
- Mark /usr/share/doc/packages/bash-completion/ as owned by that
  package (RPMv4 complained about that).
* Thu Jul 24 2003 agruen@suse.de
- Create initial package.
openSUSE Build Service is sponsored by