SPECS: man.spec - UTF-8 support (man pages, display and whatis) - ...
baggins
baggins at pld-linux.org
Mon Nov 6 18:59:56 CET 2006
Author: baggins Date: Mon Nov 6 17:59:56 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- UTF-8 support (man pages, display and whatis)
- use man.config in man pages (was man.conf)
- some small but useful additions
---- Files affected:
SPECS:
man.spec (1.128 -> 1.129)
---- Diffs:
================================================================
Index: SPECS/man.spec
diff -u SPECS/man.spec:1.128 SPECS/man.spec:1.129
--- SPECS/man.spec:1.128 Fri Oct 27 20:27:40 2006
+++ SPECS/man.spec Mon Nov 6 18:59:51 2006
@@ -13,7 +13,7 @@
Summary(uk): îÁÂŚŇ ŐÔÉĚŚÔ ÄĚŃ ÄĎËŐÍĹÎÔÁĂŚ§: man, apropos ÔÁ whatis
Name: man
Version: 1.6d
-Release: 3
+Release: 3.1
License: GPL
Group: Applications/System
Source0: http://primates.ximian.com/~flucifredi/man/%{name}-%{version}.tar.gz
@@ -21,6 +21,7 @@
Source1: makewhatis.crondaily
Source2: makewhatis.cronweekly
Source3: %{name}-additional-%{name}-pages.tar.bz2
+Source4: %{name}-mess.ru
# Source3-md5: 16c3fde2243289524cf40c1d2e7150e4
Patch0: %{name}-manpaths.patch
Patch1: %{name}-PLD.patch
@@ -30,25 +31,32 @@
Patch5: %{name}-security.patch
Patch6: %{name}-roff.patch
Patch7: %{name}-sofix.patch
-Patch8: %{name}-ro-usr.patch
-Patch9: %{name}-bug11621.patch
-Patch10: %{name}-gencat.patch
-Patch11: %{name}-nls-priority.patch
-Patch12: %{name}-pmake.patch
-Patch13: %{name}-fmntbug.patch
-Patch14: %{name}-awk_path.patch
-Patch15: %{name}-cgi_paths.patch
-Patch16: %{name}-relat.patch
-Patch17: %{name}-encoding.patch
+Patch8: %{name}-bug11621.patch
+Patch9: %{name}-gencat.patch
+Patch10: %{name}-nls-priority.patch
+Patch11: %{name}-pmake.patch
+Patch12: %{name}-fmntbug.patch
+Patch13: %{name}-awk_path.patch
+Patch14: %{name}-cgi_paths.patch
+Patch15: %{name}-relat.patch
+Patch16: %{name}-encoding.patch
+Patch17: %{name}-man-pages.patch
+Patch18: %{name}-i18n_nroff.patch
+Patch19: %{name}-i18n_makewhatis.patch
+Patch20: %{name}-apropos.patch
+Patch21: %{name}-sec.patch
+Patch22: %{name}-rpm.patch
URL: http://primates.ximian.com/~flucifredi/man/
+BuildRequires: iconv
BuildRequires: less
BuildRequires: rpmbuild(macros) >= 1.268
BuildRequires: sed >= 4.0
Requires(post,preun): fileutils
Requires: %{name}-config = %{version}-%{release}
Requires: /bin/awk
-Requires: groff
+Requires: groff >= 1.19.1-4
Requires: gzip
+Requires: iconv
Requires: less
Requires: mktemp >= 1.5-8
Obsoletes: man-cs
@@ -218,6 +226,45 @@
%patch15 -p1
%patch16 -p1
%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
+%patch21 -p1
+%patch22 -p1
+
+cp -f %{SOURCE3} msgs # replace bad ru trans
+
+for i in $(find man -name man.conf.man); do
+ mv $i ${i%man.conf.man}man.config.man
+done
+
+for src in $(find msgs -type f -name 'mess.[a-z][a-z]'); do
+ lang=$(echo ${src} | sed -r 's;.*([a-z]{2})$;\1;')
+ if [ ${lang} = ja ]; then charset=euc-jp
+ elif [ ${lang} = ko ]; then charset=euc-kr
+ elif [ ${lang} = ru ]; then charset=koi8-r
+ elif [ ${lang} = da ]; then charset=iso-8859-1
+ elif [ ${lang} = de ]; then charset=iso-8859-1
+ elif [ ${lang} = en ]; then charset=iso-8859-1
+ elif [ ${lang} = es ]; then charset=iso-8859-1
+ elif [ ${lang} = fi ]; then charset=iso-8859-1
+ elif [ ${lang} = fr ]; then charset=iso-8859-1
+ elif [ ${lang} = it ]; then charset=iso-8859-1
+ elif [ ${lang} = pt ]; then charset=iso-8859-1
+ elif [ ${lang} = nl ]; then charset=iso-8859-1
+ elif [ ${lang} = cs ]; then charset=iso-8859-2
+ elif [ ${lang} = hr ]; then charset=iso-8859-2
+ elif [ ${lang} = pl ]; then charset=iso-8859-2
+ elif [ ${lang} = ro ]; then charset=iso-8859-2
+ elif [ ${lang} = sl ]; then charset=iso-8859-2
+ elif [ ${lang} = bg ]; then charset=cp1251
+ elif [ ${lang} = el ]; then charset=iso-8859-7
+ else
+ echo === LANGUAGE ${lang}: MUST SPECIFY CHARSET/ENCODING
+ exit 1
+ fi
+ iconv -t utf-8 -f ${charset} -o ${src}.utf ${src} && mv ${src}.utf ${src}
+done
# use gzip (not bzip2) to compress formatted man pages
sed -i -e 's/compress=$/compress=gzip/' configure
@@ -236,6 +283,9 @@
+lang all \
-confdir %{_sysconfdir}
+# HACK: Make output default to using -c; otherwise it appears broken.
+perl -pi -e "s/nroff /nroff -c /" conf_script
+
%{__make} \
BUILD_CC="%{__cc} %{rpmcflags} %{rpmldflags}" \
CC="%{__cc} %{rpmcflags}" \
@@ -270,6 +320,46 @@
%{__make} -C man2html install-scripts \
PREFIX="$RPM_BUILD_ROOT"
+for src in $(find man -type f -name '*.[1-9n]'); do
+ lang=$(echo ${src} | sed -r 's;.*/([a-z]{2})/.*;\1;')
+ page=$(basename ${src})
+ sect=$(echo ${page} | sed -r 's;.*([1-9n])$;man\1;')
+ dir=${RPM_BUILD_ROOT}%{_mandir}
+ if [ ${lang} = ja ]; then charset=euc-jp
+ elif [ ${lang} = ko ]; then charset=euc-kr
+ elif [ ${lang} = da ]; then charset=iso-8859-1
+ elif [ ${lang} = de ]; then charset=iso-8859-1
+ elif [ ${lang} = en ]; then charset=iso-8859-1
+ elif [ ${lang} = es ]; then charset=iso-8859-1
+ elif [ ${lang} = fi ]; then charset=iso-8859-1
+ elif [ ${lang} = fr ]; then charset=iso-8859-1
+ elif [ ${lang} = it ]; then charset=iso-8859-1
+ elif [ ${lang} = pt ]; then charset=iso-8859-1
+ elif [ ${lang} = nl ]; then charset=iso-8859-1
+ elif [ ${lang} = cs ]; then charset=iso-8859-2
+ elif [ ${lang} = hr ]; then charset=iso-8859-2
+ elif [ ${lang} = pl ]; then charset=iso-8859-2
+ elif [ ${lang} = ro ]; then charset=iso-8859-2
+ elif [ ${lang} = sl ]; then charset=iso-8859-2
+ elif [ ${lang} = hu ]; then charset=iso-8859-2
+ elif [ ${lang} = bg ]; then charset=cp1251
+ elif [ ${lang} = el ]; then charset=iso-8859-7
+ else
+ echo === LANGUAGE ${lang}: MUST SPECIFY CHARSET/ENCODING
+ exit 1
+ fi
+ mkdir -p ${dir}/${lang}/${sect}
+ iconv -t utf-8 -f ${charset} -o ${dir}/${lang}/${sect}/${page} ${src}
+
+ # ensure POSIX/C locale only has ASCII subset and no latin-1
+ if [ ${lang} = en ]; then
+ mkdir -p ${dir}/${sect}
+ iconv -t ascii//translit -f ${charset} -o ${dir}/${sect}/${page} ${src}
+ fi
+done
+
+rm -rf $RPM_BUILD_ROOT%{_mandir}/en
+
# for man_db and xman compatibility
ln -sf soelim $RPM_BUILD_ROOT%{_bindir}/zsoelim
@@ -465,6 +555,7 @@
%attr(755,root,root) %{_bindir}/man2html
%{_mandir}/man1/man2html.1*
%lang(el) %{_mandir}/el/man1/man2html.1*
+%lang(fr) %{_mandir}/fr/man1/man2html.1*
%lang(ja) %{_mandir}/ja/man1/man2html.1*
%lang(pl) %{_mandir}/pl/man1/man2html.1*
%lang(ro) %{_mandir}/ro/man1/man2html.1*
@@ -490,6 +581,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.129 2006/11/06 17:59:51 baggins
+- UTF-8 support (man pages, display and whatis)
+- use man.config in man pages (was man.conf)
+- some small but useful additions
+
Revision 1.128 2006/10/27 18:27:40 qboosh
- updated dep for /usr/lib/cgi-bin dir (FHS -> filesystem); release 3
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/man.spec?r1=1.128&r2=1.129&f=u
More information about the pld-cvs-commit
mailing list