!135 add manpages
From: @yue-yuankun Reviewed-by: @dillon_chen Signed-off-by: @dillon_chen
This commit is contained in:
commit
de298f63fb
40
bash.spec
40
bash.spec
@ -8,7 +8,7 @@
|
||||
|
||||
Name: bash
|
||||
Version: 5.2.15
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: It is the Bourne Again Shell
|
||||
License: GPLv3
|
||||
URL: https://www.gnu.org/software/bash
|
||||
@ -106,6 +106,40 @@ popd
|
||||
|
||||
%install
|
||||
%make_install install-headers
|
||||
|
||||
# make manpages for bash builtins as per suggestion in DOC/README
|
||||
pushd doc
|
||||
sed -e '
|
||||
/^\.SH NAME/, /\\- bash built-in commands, see \\fBbash\\fR(1)$/{
|
||||
/^\.SH NAME/d
|
||||
s/^bash, //
|
||||
s/\\- bash built-in commands, see \\fBbash\\fR(1)$//
|
||||
s/,//g
|
||||
b
|
||||
}
|
||||
d
|
||||
' builtins.1 > man.pages
|
||||
for i in echo pwd test kill; do
|
||||
sed -i -e "s,$i,,g" man.pages
|
||||
sed -i -e "s, , ,g" man.pages
|
||||
done
|
||||
|
||||
install -p -m 644 builtins.1 %{buildroot}%{_mandir}/man1/builtins.1
|
||||
|
||||
for i in `cat man.pages` ; do
|
||||
echo .so man1/builtins.1 > %{buildroot}%{_mandir}/man1/$i.1
|
||||
chmod 0644 %{buildroot}%{_mandir}/man1/$i.1
|
||||
done
|
||||
popd
|
||||
|
||||
# Link bash man page to sh so that man sh works.
|
||||
ln -s bash.1 %{buildroot}%{_mandir}/man1/sh.1
|
||||
|
||||
# Not for printf, true and false (conflict with coreutils)
|
||||
rm -f %{buildroot}/%{_mandir}/man1/printf.1
|
||||
rm -f %{buildroot}/%{_mandir}/man1/true.1
|
||||
rm -f %{buildroot}/%{_mandir}/man1/false.1
|
||||
|
||||
ln -sf bash %{buildroot}%{_bindir}/sh
|
||||
install -pDm 644 %SOURCE1 %{buildroot}/etc/skel/.bashrc
|
||||
install -pDm 644 %SOURCE2 %{buildroot}/etc/skel/.bash_profile
|
||||
@ -159,9 +193,13 @@ make check
|
||||
%doc %{_docdir}/%{name}/*
|
||||
%{_infodir}/%{name}.info*
|
||||
%{_mandir}/man1/*.gz
|
||||
%{_mandir}/*/..1*
|
||||
%exclude %{_infodir}/dir
|
||||
|
||||
%changelog
|
||||
* Wed Apr 10 2024 yueyuankun <yueyuankun@kylinos.cn> -5.2.15-6
|
||||
- add manpages
|
||||
|
||||
* Mon Dec 4 2023 hongjinghao <hongjinghao@huawei.com> -5.2.15-5
|
||||
- sync patches from bash community
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user