- Simplified the build and installed phases; pages are now recoded during

the install.
- Moved the "rm" commands from build to prep.
- Added epoll_pwait.patch to fix a circular link.
This commit is contained in:
Štěpán Kasal 2007-06-05 17:16:54 +00:00
parent b3d0140a3c
commit 81b3af57ef
2 changed files with 44 additions and 63 deletions

View File

@ -0,0 +1,10 @@
We don't need no circular links!
I hereby state that I wrote this patch in its entirety.
--Stepan Kasal
--- man-pages-2.51.orig/man2/epoll_pwait.2 2007-04-30 18:06:33.000000000 +0200
+++ man-pages-2.51/man2/epoll_pwait.2 2007-06-05 19:01:48.000000000 +0200
@@ -1 +1 @@
-.so man2/epoll_pwait.2
+.so man2/epoll_wait.2

View File

@ -1,7 +1,7 @@
Summary: Man (manual) pages from the Linux Documentation Project Summary: Man (manual) pages from the Linux Documentation Project
Name: man-pages Name: man-pages
Version: 2.51 Version: 2.51
Release: 3%{?dist} Release: 4%{?dist}
License: distributable License: distributable
Group: Documentation Group: Documentation
URL: http://www.kernel.org/pub/linux/docs/manpages/ URL: http://www.kernel.org/pub/linux/docs/manpages/
@ -31,6 +31,7 @@ Patch44: man-pages-2.43-fadvise.patch
Patch45: man-pages-2.48-passwd.patch Patch45: man-pages-2.48-passwd.patch
Patch46: man-pages-2.51-nscd-conf.patch Patch46: man-pages-2.51-nscd-conf.patch
Patch47: man-pages-2.51-typos.patch Patch47: man-pages-2.51-typos.patch
Patch48: man-pages-2.51-epoll_pwait.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Autoreq: false Autoreq: false
@ -68,10 +69,9 @@ tar xzf %{SOURCE11}
%patch45 -p1 %patch45 -p1
%patch46 -p1 %patch46 -p1
%patch47 -p1 %patch47 -p1
%patch48 -p1
%build ### And now remove those we are not going to use:
rm -fv man1/README
# These are parts of fileutils # These are parts of fileutils
rm -fv man1/{chgrp,chmod,chown,cp,dd,df,dircolors,du,install}.1 rm -fv man1/{chgrp,chmod,chown,cp,dd,df,dircolors,du,install}.1
@ -124,7 +124,7 @@ rm -rf man1p/compress.1p
rm -rf man1p/renice.1p rm -rf man1p/renice.1p
# Part of libattr-devel # Part of libattr-devel
rm -f man2/{fgetxattr,flistxattr,fremovexattr,fsetxattr,getxattr,lgetxattr,listxattr,llistxattr,lremovexattr,lsetxattr,removexattr,setxattr}.2* rm -f man2/{,f,l}{get,list,remove,set}xattr.2*
# Part of numactl # Part of numactl
rm -f man2/{mbind,set_mempolicy}.2 rm -f man2/{mbind,set_mempolicy}.2
@ -138,70 +138,35 @@ rm -f man8/rpcinfo.8
# Deprecated # Deprecated
rm -f man2/pciconfig_{write,read,iobase}.2 rm -f man2/pciconfig_{write,read,iobase}.2
find . -name "*sudo*" -exec rm {} \; find . -name "*sudo*" | xargs --no-run-if-empty rm
for l1 in man[1-9]*/*
do mkdir -p $(dirname en/$l1) %build
if [ "$l1" != man7/iso_8859-1.7 ] && : Nothing to build.
[ "$l1" != man7/iso_8859-2.7 ] &&
[ "$l1" != man7/iso_8859-7.7 ] &&
[ "$l1" != man7/iso_8859-9.7 ] &&
[ "$l1" != man7/iso_8859-15.7 ] &&
[ "$l1" != man7/iso_8859-16.7 ] &&
[ "$l1" != man7/koi8-r.7 ]; then
LANG=en iconv -f latin1 -t utf-8 -o en/$l1 $l1
rm -f $l1
LANG=en iconv -f utf-8 -t ascii//translit -o $l1 en/$l1
else
if [ "$l1" == man7/iso_8859-1.7 ]; then
LANG=en iconv -f iso_8859-1 -t utf-8 -o en/$l1 $l1
fi;
if [ "$l1" == man7/iso_8859-2.7 ]; then
LANG=en iconv -f iso_8859-2 -t utf-8 -o en/$l1 $l1
fi;
if [ "$l1" == man7/iso_8859-7.7 ]; then
LANG=en iconv -f iso_8859-7 -t utf-8 -o en/$l1 $l1
fi;
if [ "$l1" == man7/iso_8859-9.7 ]; then
LANG=en iconv -f iso_8859-9 -t utf-8 -o en/$l1 $l1
fi;
if [ "$l1" == man7/iso_8859-15.7 ]; then
LANG=en iconv -f iso_8859-15 -t utf-8 -o en/$l1 $l1
fi;
if [ "$l1" == man7/iso_8859-16.7 ]; then
LANG=en iconv -f iso_8859-16 -t utf-8 -o en/$l1 $l1
fi;
if [ "$l1" == man7/koi8-r.7 ]; then
LANG=en iconv -f koi8-r -t utf-8 -o en/$l1 $l1
fi;
cp en/$l1 $l1
fi
done
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
for n in 0p 1 1p 2 3 3p 4 5 6 7 8 9 instdir=$RPM_BUILD_ROOT%{_mandir}
do mkdir -p $RPM_BUILD_ROOT%{_mandir}/man$n for sec in 0p 1 1p 2 3 3p 4 5 6 7 8 9; do
mkdir -p $RPM_BUILD_ROOT%{_mandir}/en/man$n mkdir -p $instdir{,/en}/man$sec
done for f in man$sec/*.$sec; do
for n in man*/* case $f in
do cp -a $n $RPM_BUILD_ROOT%{_mandir}/$n man$sec/'*'.$sec)
if diff -q en/$n $n # this dir is empty
then rm -f en/$n continue ;;
elif [ $? -eq 1 ] man7/iso_8859-*.7 | man7/koi8-r.7)
then cp -a en/$n $RPM_BUILD_ROOT%{_mandir}/en/$n enc=${f#man7/}
fi enc=${enc%.7}
if [ "$n" == man7/iso_8859-1.7 ] || LANG=en iconv -f $enc -t utf-8 -o $instdir/$f $f ;;
[ "$n" == man7/iso_8859-2.7 ] || *)
[ "$n" == man7/iso_8859-7.7 ] || LANG=en iconv -f latin1 -t utf-8 -o $instdir/en/$f $f
[ "$n" == man7/iso_8859-9.7 ] || LANG=en iconv -f utf-8 -t ascii//translit -o $instdir/$f $instdir/en/$f
[ "$n" == man7/iso_8859-15.7 ] || cmp -s $instdir/$f $instdir/en/$f &&
[ "$n" == man7/iso_8859-16.7 ] || rm $instdir/en/$f ;;
[ "$n" == man7/koi8-r.7 ]; then esac
cp $n $RPM_BUILD_ROOT%{_mandir}/en/$n done
fi
done done
%clean %clean
@ -214,6 +179,12 @@ rm -rf $RPM_BUILD_ROOT
%lang(en) %{_mandir}/en/man* %lang(en) %{_mandir}/en/man*
%changelog %changelog
* Mon Jun 4 2007 Stepan Kasal <skasal@redhat.com> - 2.51-4
- Simplified the build and installed phases; pages are now recoded
during the install.
- Moved the "rm" commands from build to prep.
- Added epoll_pwait.patch to fix a circular link.
* Mon Jun 4 2007 Stepan Kasal <skasal@redhat.com> - 2.51-3 * Mon Jun 4 2007 Stepan Kasal <skasal@redhat.com> - 2.51-3
- Add man-pages-2.51-nscd-conf.patch, fixes #204596 - Add man-pages-2.51-nscd-conf.patch, fixes #204596
- Fix typos, man-pages-2.51-typos.patch - Fix typos, man-pages-2.51-typos.patch