mirror of
https://github.com/YellowJacketLinux/LFS.git
synced 2025-02-02 23:07:14 +08:00
add bash completion
This commit is contained in:
parent
d546244605
commit
e2315c5b91
@ -32,4 +32,8 @@ fi
|
|||||||
|
|
||||||
unset RED GREEN NORMAL
|
unset RED GREEN NORMAL
|
||||||
|
|
||||||
|
# Use bash-completion, if available
|
||||||
|
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
|
||||||
# End /etc/bashrc
|
# End /etc/bashrc
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
%global bashv 5.2.15
|
||||||
|
%global bcompv 2.11
|
||||||
|
%global bcompdir %{_datadir}/bash-completion
|
||||||
|
|
||||||
# Many (most?) distributions put install-info in /{,usr/}sbin
|
# Many (most?) distributions put install-info in /{,usr/}sbin
|
||||||
# YJL defines this macro to /usr/bin/install-info
|
# YJL defines this macro to /usr/bin/install-info
|
||||||
# so define it to be in /sbin/ if not defined.
|
# so define it to be in /sbin/ if not defined.
|
||||||
@ -7,55 +11,78 @@
|
|||||||
|
|
||||||
Name: bash
|
Name: bash
|
||||||
Version: 5.2.15
|
Version: 5.2.15
|
||||||
Release: %{?repo}0.rc4%{?dist}
|
Release: %{?repo}0.rc5%{?dist}
|
||||||
Summary: The Bourne Again Shell
|
Summary: The Bourne Again Shell
|
||||||
|
|
||||||
Group: System Environment/Shells
|
Group: System Environment/Shells
|
||||||
License: GPLv3
|
License: GPL-3.0-or-later and GPL-2.0-or-later
|
||||||
URL: https://gnu.org/software/bash
|
URL: https://gnu.org/software/bash
|
||||||
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
|
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
Source1: https://github.com/scop/bash-completion/releases/download/%{bcompv}/bash-completion-%{bcompv}.tar.xz
|
||||||
# These are from BLFS - https://www.linuxfromscratch.org/blfs/view/stable/postlfs/profile.html 2023-03-11
|
# These are from BLFS - https://www.linuxfromscratch.org/blfs/view/stable/postlfs/profile.html 2023-03-11
|
||||||
Source1: bash-profile
|
Source11: bash-profile
|
||||||
Source2: bash-bashrc
|
Source12: bash-bashrc
|
||||||
|
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
BuildRequires: ncurses-devel
|
BuildRequires: ncurses-devel
|
||||||
Requires(post): %{insinfo}
|
Requires(post): %{insinfo}
|
||||||
Requires(preun): %{insinfo}
|
Requires(preun): %{insinfo}
|
||||||
|
Provides: bash-completion
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Bash is a Unix shell and scripting language developed for the GNU project as a
|
Bash is a Unix shell and scripting language developed for the GNU project as a
|
||||||
replacement for the Bourne shell. Bash is the stanard shell for the GNU/Linux
|
replacement for the Bourne shell. Bash is the stanard shell for the GNU/Linux
|
||||||
operating system.
|
operating system.
|
||||||
|
|
||||||
|
This package also includes bash-completion %{bcompv}.
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
Provides: bash-completion-devel
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package includes the headers and related files needed to build software
|
This package includes the headers and related files needed to build software
|
||||||
that uses bash.
|
that uses bash.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -c -q
|
||||||
|
tar -xf %{SOURCE1}
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
cd bash-%{bashv}
|
||||||
%configure \
|
%configure \
|
||||||
--bindir=/bin \
|
--bindir=/bin \
|
||||||
--without-bash-malloc \
|
--without-bash-malloc \
|
||||||
--with-installed-readline
|
--with-installed-readline
|
||||||
# --docdir=%{_datadir}/doc/%{name}-%{version}
|
# --docdir=%{_datadir}/doc/%{name}-%{version}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
cd ../bash-completion-%{bcompv}
|
||||||
|
%configure
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
cd bash-%{bashv}
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
|
cd ../bash-completion-%{bcompv}
|
||||||
|
make install DESTDIR=%{buildroot}
|
||||||
|
rm -f %{buildroot}%{_sysconfdir}/profile.d/bash_completion.sh
|
||||||
|
cd ..
|
||||||
|
mkdir bash-completion
|
||||||
|
for docfile in AUTHORS CHANGES CONTRIBUTING.md COPYING README.md; do
|
||||||
|
cp -p bash-completion-%{bcompv}/${docfile} bash-completion/
|
||||||
|
done
|
||||||
|
cp -p bash-completion-%{bcompv}/COPYING ./COPYING.bash-completion
|
||||||
|
cp -p bash-%{bashv}/COPYING ./COPYING.bash
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
ln -sf bash %{buildroot}/bin/sh
|
ln -sf bash %{buildroot}/bin/sh
|
||||||
install -m644 -D %{SOURCE1} %{buildroot}/%{_sysconfdir}/profile
|
install -m644 -D %{SOURCE11} %{buildroot}/%{_sysconfdir}/profile
|
||||||
install -m644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/bashrc
|
install -m644 %{SOURCE12} %{buildroot}/%{_sysconfdir}/bashrc
|
||||||
install -d %{buildroot}%{_sysconfdir}/profile.d
|
install -d %{buildroot}%{_sysconfdir}/profile.d
|
||||||
install -d %{buildroot}%{_sysconfdir}/skel
|
install -d %{buildroot}%{_sysconfdir}/skel
|
||||||
|
|
||||||
@ -260,10 +287,22 @@ fi
|
|||||||
%attr(0644,root,root) %{_mandir}/man1/bash.1*
|
%attr(0644,root,root) %{_mandir}/man1/bash.1*
|
||||||
%attr(0644,root,root) %{_mandir}/man1/bashbug.1*
|
%attr(0644,root,root) %{_mandir}/man1/bashbug.1*
|
||||||
# %%{_datadir}/doc/%%{name}-%%{version}
|
# %%{_datadir}/doc/%%{name}-%%{version}
|
||||||
%license COPYING
|
# Bash Completion
|
||||||
%doc AUTHORS CHANGES COMPAT COPYING ChangeLog NEWS RBASH
|
%dir %{bcompdir}
|
||||||
%doc doc/README doc/FAQ doc/INTRO doc/bash.html doc/bashref.html
|
%attr(0644,root,root) %{bcompdir}/bash_completion
|
||||||
%doc doc/bash.pdf doc/bashref.pdf
|
%{bcompdir}/completions
|
||||||
|
%dir %{bcompdir}/helpers
|
||||||
|
%attr(0644,root,root) %{bcompdir}/helpers/perl
|
||||||
|
%attr(0644,root,root) %{bcompdir}/helpers/python
|
||||||
|
# otro
|
||||||
|
%license COPYING.bash-completion COPYING.bash
|
||||||
|
%doc bash-%{bashv}/AUTHORS bash-%{bashv}/CHANGES bash-%{bashv}/COMPAT
|
||||||
|
%doc bash-%{bashv}/COPYING bash-%{bashv}/ChangeLog bash-%{bashv}/NEWS
|
||||||
|
%doc bash-%{bashv}/RBASH
|
||||||
|
%doc bash-%{bashv}/doc/README bash-%{bashv}/doc/FAQ bash-%{bashv}/doc/INTRO
|
||||||
|
%doc bash-%{bashv}/doc/bash.html bash-%{bashv}/doc/bashref.html
|
||||||
|
%doc bash-%{bashv}/doc/bash.pdf bash-%{bashv}/doc/bashref.pdf
|
||||||
|
%doc bash-completion
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -274,11 +313,25 @@ fi
|
|||||||
%attr(0755,root,root) %dir %{_includedir}/bash/include
|
%attr(0755,root,root) %dir %{_includedir}/bash/include
|
||||||
%attr(0644,root,root) %{_includedir}/bash/include/*.h
|
%attr(0644,root,root) %{_includedir}/bash/include/*.h
|
||||||
%attr(0644,root,root) %{_libdir}/pkgconfig/%{name}.pc
|
%attr(0644,root,root) %{_libdir}/pkgconfig/%{name}.pc
|
||||||
%license COPYING
|
%dir %{_datadir}/cmake
|
||||||
|
%dir %{_datadir}/cmake/bash-completion
|
||||||
|
%attr(0644,root,root) %{_datadir}/cmake/bash-completion/*.cmake
|
||||||
|
%attr(0644,root,root) %{_datadir}/pkgconfig/bash-completion.pc
|
||||||
|
# otro
|
||||||
|
%license COPYING.bash-completion COPYING.bash
|
||||||
|
%doc bash-%{bashv}/AUTHORS bash-%{bashv}/CHANGES bash-%{bashv}/COMPAT
|
||||||
|
%doc bash-%{bashv}/COPYING bash-%{bashv}/ChangeLog bash-%{bashv}/NEWS
|
||||||
|
%doc bash-%{bashv}/RBASH
|
||||||
|
%doc bash-%{bashv}/doc/README bash-%{bashv}/doc/FAQ bash-%{bashv}/doc/INTRO
|
||||||
|
%doc bash-%{bashv}/doc/bash.html bash-%{bashv}/doc/bashref.html
|
||||||
|
%doc bash-%{bashv}/doc/bash.pdf bash-%{bashv}/doc/bashref.pdf
|
||||||
|
%doc bash-completion
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri May 05 2023 Michael A. Peters <anymouseprophet@gmail.com> - 5.2.15-0.rc5
|
||||||
|
- Add bash-completion package
|
||||||
|
|
||||||
* Tue Apr 11 2023 Michael A. Peters <anymouseprophet@gmail.com> - 5.2.15-0.rc4
|
* Tue Apr 11 2023 Michael A. Peters <anymouseprophet@gmail.com> - 5.2.15-0.rc4
|
||||||
- Use insinfo macro, add post/preun requires.
|
- Use insinfo macro, add post/preun requires.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user