From 2fc1d9169e2bc1fd49282d58ddc64a3ab1a2886c Mon Sep 17 00:00:00 2001 From: yueyuankun Date: Tue, 9 Apr 2024 17:28:21 +0800 Subject: [PATCH] Add manpages (cherry picked from commit 74ef4b97986a9a922aa79b3df82f98816ae79e0b) --- bash.spec | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/bash.spec b/bash.spec index aa3afdb..efe0cba 100644 --- a/bash.spec +++ b/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 -5.2.15-6 +- add manpages + * Mon Dec 4 2023 hongjinghao -5.2.15-5 - sync patches from bash community -- Gitee