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