]>
Commit | Line | Data |
---|---|---|
a951d908 | 1 | # vim:ft=spec |
d29cc16a | 2 | # TODO |
a951d908 | 3 | # - use mkinitrd and update for geninitrd |
8fe2d404 | 4 | # - fix vim not to mark this file as bash |
7a6139c0 | 5 | Summary: bash-completion offers programmable completion for bash |
dc5beabb | 6 | Summary(pl.UTF-8): Programowalne uzupełnianie nazw dla basha |
d27c9ff9 | 7 | Name: bash-completion |
8a463e45 | 8 | Version: 2.1 |
0d1d52d3 | 9 | Release: 4 |
993e26e2 | 10 | Epoch: 1 |
cc8573cd | 11 | License: GPL v2+ |
7a6139c0 | 12 | Group: Applications/Shells |
174ec85b | 13 | Source0: http://bash-completion.alioth.debian.org/files/%{name}-%{version}.tar.bz2 |
8a463e45 | 14 | # Source0-md5: 4e2a9f11a4042a38ee79ddcd048e8b9e |
80319ab9 | 15 | Source1: %{name}-poldek.sh |
b4c03bc2 ER |
16 | # https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/106975 |
17 | Source3: http://launchpadlibrarian.net/19164189/mysqldump | |
18 | # Source3-md5: 09e4885be92e032400ed702f39925d85 | |
82bf3d4d | 19 | Source4: http://svn.php.net/viewvc/pear2/sandbox/PEAR_BashCompletion/trunk/pear?revision=285425&view=co?/pear |
f11c616c | 20 | # Source4-md5: 8ce77e4459e2c45e2096da8d03c8f43d |
f4f5d91d | 21 | Patch0: %{name}-rpm-cache.patch |
9915aa77 | 22 | Patch1: pear.patch |
d710ecea | 23 | URL: http://bash-completion.alioth.debian.org/ |
602c54b9 | 24 | BuildRequires: sed >= 4.0 |
8820cfb2 | 25 | Requires(triggerpostun): sed >= 4.0 |
cc8573cd | 26 | Requires: bash >= 4.1 |
78e5ac4e | 27 | Requires: pld-release |
80319ab9 | 28 | Obsoletes: bash-completion-rpm-cache |
c65ce1a0 | 29 | Conflicts: rpm < 4.4.9-44 |
23c95f44 | 30 | BuildArch: noarch |
7a6139c0 | 31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
aa677e2c | 32 | |
33 | %description | |
34 | bash-completion is a collection of shell functions that take advantage | |
b8263468 | 35 | of the programmable completion feature of bash 4.1 and later. |
aa677e2c | 36 | |
5b7e80f9 JR |
37 | %description -l pl.UTF-8 |
38 | bash-completion jest kolekcją funkcji shella, które opierają się na | |
b8263468 JB |
39 | wbudowanych rozszerzeniach basha 4.1 lub późniejszego umożliwiającego |
40 | dopełnianie parametrów linii poleceń. | |
aa677e2c | 41 | |
42 | %prep | |
7ebfc135 | 43 | %setup -q |
0113649b | 44 | cp -p '%{SOURCE4}' completions/pear |
9915aa77 ER |
45 | %patch0 -p1 |
46 | %patch1 -p1 | |
d29cc16a ER |
47 | |
48 | # cleanup backups after patching | |
49 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
50 | ||
602c54b9 ER |
51 | # update path |
52 | %{__sed} -i -e 's#${BASH_SOURCE\[0\]%/\*}#%{_datadir}/%{name}#' completions/perl | |
53 | ||
cc8573cd JB |
54 | %build |
55 | %configure | |
56 | %{__make} | |
4fd53c3f | 57 | |
e9c9a2cf ER |
58 | %install |
59 | rm -rf $RPM_BUILD_ROOT | |
e24590f8 | 60 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/bash_completion.d |
cc8573cd | 61 | |
a46e7a4f | 62 | %{__make} install -j1 \ |
b99c873d ER |
63 | INSTALL="install -p" \ |
64 | profiledir=/etc/shrc.d \ | |
65 | DESTDIR=$RPM_BUILD_ROOT | |
cc8573cd | 66 | |
c4481a09 ER |
67 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/poldek |
68 | cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/mysqldump | |
ebd3c66b | 69 | cp -p completions/pear $RPM_BUILD_ROOT%{_datadir}/%{name}/completions |
c4481a09 | 70 | |
0d1d52d3 JR |
71 | # util-linux |
72 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/{cal,chsh,dmesg,eject,hexdump,hwclock,ionice,look,newgrp,renice,rtcwake,su} | |
cc8573cd JB |
73 | # No package matches '*/apache2ctl' |
74 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/apache2ctl | |
75 | # No PLD package or no such binary to complete on | |
b99c873d | 76 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/{larch,lisp,monodevelop,[pg]4,cowsay,cowthink,cpan2dist} |
cc8573cd | 77 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/{mkinitrd,rpmcheck} |
b99c873d ER |
78 | # FreeBSD stuff |
79 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/{kldload,portupgrade} | |
80 | # Debian stuff | |
81 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/{apt-build,dselect,reportbug,alternatives,update-alternatives,lintian,lintian-info} | |
b2b3d5ee SS |
82 | # NetworkManager stuff |
83 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/completions/nmcli | |
d29cc16a | 84 | |
8820cfb2 | 85 | |
b9b3fa07 ER |
86 | # do not generate autodeps |
87 | chmod a-x $RPM_BUILD_ROOT%{_datadir}/%{name}/helpers/perl | |
88 | ||
8820cfb2 ER |
89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT | |
91 | ||
80319ab9 | 92 | %triggerpostun -- %{name} < 20050721-3.9 |
8820cfb2 | 93 | sed -i -e '/^# START bash completion/,/^# END bash completion/d' /etc/bashrc |
aa677e2c | 94 | |
e24590f8 | 95 | %files |
aa677e2c | 96 | %defattr(644,root,root,755) |
e24590f8 ER |
97 | %doc AUTHORS CHANGES README |
98 | /etc/shrc.d/bash_completion.sh | |
d29cc16a ER |
99 | %dir %{_sysconfdir}/bash_completion.d |
100 | %dir %{_datadir}/%{name} | |
e24590f8 | 101 | %{_datadir}/%{name}/bash_completion |
cc8573cd | 102 | %dir %{_datadir}/%{name}/completions |
e24590f8 | 103 | %{_datadir}/%{name}/completions/* |
b9b3fa07 ER |
104 | %dir %{_datadir}/%{name}/helpers |
105 | %attr(755,root,root) %{_datadir}/%{name}/helpers/perl | |
e24590f8 | 106 | %{_npkgconfigdir}/bash-completion.pc |