Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > db03f25d66429341bf836a4759a061b8 > files > 30

man-1.6e-9mdv2009.1.src.rpm

Summary:	A set of documentation tools: man, apropos and whatis
Name:		man
Version:	1.6e
Release:	%mkrel 9
License:	GPL
Group:		System/Base
Url:		http://primates.ximian.com/~flucifredi/man/
Source0:	http://primates.ximian.com/~flucifredi/man/%{name}-%{version}.tar.gz
Source1:	makewhatis.cronweekly
Source2:	makewhatis.crondaily
Patch1:		man-1.5k-confpath.patch
Patch4:		man-1.5h1-make.patch
Patch5:		man-1.5k-nonascii.patch
Patch6:		man-1.6e-security.patch
Patch7:		man-1.6e-mandirs.patch
Patch8:		man-1.5m2-bug11621.patch
Patch9:		man-1.5k-sofix.patch
Patch10:	man-1.5m2-buildroot.patch
Patch12:	man-1.6e-ro_usr.patch
Patch14:	man-1.5i2-newline.patch
Patch17:	man-1.5j-utf8.patch
Patch19:	man-1.5i2-overflow.patch
Patch22:	man-1.5j-nocache.patch
Patch24:	man-1.5i2-initial.patch
Patch25:	man-1.6e-use_i18n_vars_in_a_std_way.patch
Patch26:	man-1.5m2-no-color-for-printing.patch
# ignore SIGPIPE signals, so no error messages are displayed
# when the pipe is broken before the formatting of the man page
# (which may take some time) is finished.
# the typical case is "man foo | head -1"
Patch27:	man-1.5m2-sigpipe.patch

# Japanese patches
Patch51:	man-1.5h1-gencat.patch
Patch102:	man-1.5g-nonrootbuild.patch
Patch104:	man-1.5m2-tv_fhs.patch
Patch105:	man-1.5j-i18n.patch
Patch107:	man-1.6e-whatis2.patch

# avoid adding a manpage already in the list
Patch200:	man-1.5m2-multiple.patch
# i18n fixes for whatis and makewhatis
Patch201:	man-1.6e-i18n_whatis.patch
Patch300:	man-1.6e-new_sections.patch

#(peroyvind)
Patch500:	man-1.6e-lzma-support.patch

Buildroot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires:	groff-for-man
BuildRequires:	lzma

%description
The man package includes three tools for finding information and/or
documentation about your Linux system: man, apropos and whatis. The man
system formats and displays on-line manual pages about commands or
functions on your system. Apropos searches the whatis database
(containing short descriptions of system commands) for a string. Whatis
searches its own database for a complete word.

The man package should be installed on your system because it is the
primary way for find documentation on a Mandriva Linux system.

%prep
%setup -q
%patch1 -p0 -b .confpath
%patch4 -p1 -b .make
%patch5 -p1 -b .nonascii
%patch6 -p1 -b .security
%patch7 -p1 -b .mandirs
%patch8 -p1 -b .ad
%patch9 -p1 -b .sofix
%patch10 -p1 -b .less
%patch12 -p1 -b .ro_usr
%patch14 -p0 -b .newline
%patch51 -p0 -b .jp2
%patch17 -p1 -b .utf8
%patch19 -p1 -b .overflow
%patch22 -p1 -b .nocache
%patch24 -p1 -b .initial
%patch25 -p1 -b .use_i18n_vars_in_a_std_way
%patch26 -p1 -b .color
%patch27 -p1 -b .sigpipe

%patch102 -p1
%patch104 -p0 -b .tv_fhs
%patch105 -p1 -b .i18n
%patch107 -p1 -b .whatis2
%patch200 -p1 -b .multiple
%patch201 -p1 -b .i18n_whatis

%patch300 -p1 -b .new_sections

%patch500 -p1 -b .lzma_support

# fixing the encodings to utf-8
for i in msgs/mess.* man/*/*.man
do
	if iconv -f utf-8 -t utf-8 -o /dev/null $i 2> /dev/null ; then continue ; fi
    lang=`echo $i | cut -d'/' -f2 | sed 's/mess.//'`
    case $lang in
    	bg) encoding=cp1251 ;;
    	cs|hu|hr|pl|ro|sk|sl) encoding=iso-8859-2 ;;
    	eo) encoding=iso-8859-3 ;;
    	el) encoding=iso-8859-7 ;;
    	ja) encoding=euc-jp ;;
    	ko) encoding=euc-kr ;;
    	ru) encoding=koi8-r ;;
    	uk) encoding=koi8-u ;;
    	*) encoding=iso-8859-1 ;;
    esac
    iconv -f $encoding -t utf-8 -o tmpfile $i && mv tmpfile $i
done

cd man;
    for i in `find -name man.conf.man`; do
        sed -e 's/MAN\.CONF/MAN\.CONFIG/g' \
            -e 's/man\.conf/man\.config/g' \
            -i $i
        mv $i `echo $i|sed -e 's/conf.man/config.man/g'`
    done
cd ..

%build
./configure -default -confdir %{_sysconfdir} +sgid +fhs +lang all 
#	-compatibility_mode_for_colored_groff
make CC="gcc -g %{optflags} -D_GNU_SOURCE" MANDIR=%{_mandir} LDFLAGS="%{ldflags}"
# it seems for some reason make rpm is building with LC_ALL=C
# which breaks gencat (as the input is utf-8); forcing a clean rebuild
(cd msgs/ ; rm -f *.cat ; LC_ALL=en_US.UTF-8 make)

%install
rm -rf %{buildroot}
perl -pi -e 's!mandir = .*$!mandir ='"%{_mandir}"'!g' man2html/Makefile
make install PREFIX=%{buildroot} mandir=%{buildroot}%{_mandir}

install -m755 %{SOURCE1} -D %{buildroot}%{_sysconfdir}/cron.weekly/makewhatis.cron
install -m755 %{SOURCE2} -D %{buildroot}%{_sysconfdir}/cron.daily/makewhatis.cron

for i in 1 2 3 4 5 6 7 8 9 n; do
	mkdir -p %{buildroot}/var/cache/man/cat$i
	mkdir -p %{buildroot}/var/cache/man/local/cat$i
	mkdir -p %{buildroot}/var/cache/man/X11R6/cat$i
done

# symlinks for manpath
pushd %{buildroot}
  ln -s man .%{_bindir}/manpath
  ln -s man.1%{_extension} .%{_mandir}/man1/manpath.1%{_extension}
popd

# those are provided in the man-pages-xx packages
rm -rf %{buildroot}%{_mandir}/{de,fr,it,pl}

# Fix makewhatis perms
chmod 755 %{buildroot}%{_sbindir}/makewhatis

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_sysconfdir}/cron.weekly/makewhatis.cron
%{_sysconfdir}/cron.daily/makewhatis.cron
%attr(2755,root,man) %{_bindir}/man
%{_bindir}/manpath
%{_bindir}/apropos
%{_bindir}/whatis
%{_bindir}/man2dvi
%{_sbindir}/makewhatis
%config(noreplace) %{_sysconfdir}/man.config
%{_mandir}/man8/*
%{_mandir}/man5/*
%{_mandir}/man1/*
# translated man pages
%lang(bg) %{_mandir}/bg/man?/*
%lang(cs) %{_mandir}/cs/man?/*
%lang(da) %{_mandir}/da/man?/*
%lang(el) %{_mandir}/el/man?/*
%lang(es) %{_mandir}/es/man?/*
%lang(fi) %{_mandir}/fi/man?/*
%lang(hr) %{_mandir}/hr/man?/*
%lang(ja) %{_mandir}/ja/man?/*
%lang(ko) %{_mandir}/ko/man?/*
%lang(nl) %{_mandir}/nl/man?/*
%lang(pt) %{_mandir}/pt/man?/*
%lang(ro) %{_mandir}/ro/man?/*
%lang(sl) %{_mandir}/sl/man?/*
%{_bindir}/man2html

%attr(0775,root,man) %dir /var/cache/man/cat[123456789n]
%attr(0775,root,man) %dir /var/cache/man/local
%attr(0775,root,man) %dir /var/cache/man/local/cat[123456789n]
%attr(0775,root,man) %dir /var/cache/man/X11R6
%attr(0775,root,man) %dir /var/cache/man/X11R6/cat[123456789n]

# translation of man program. It doesn't use gettext format, so
# find_lang doesn't find them... manual setting is needed
%lang(bg) %{_datadir}/locale/bg/man
%lang(cs) %{_datadir}/locale/cs/man
%lang(da) %{_datadir}/locale/da/man
%lang(de) %{_datadir}/locale/de/man
%lang(el) %{_datadir}/locale/el/man
%lang(en) %{_datadir}/locale/en/man
%lang(es) %{_datadir}/locale/es/man
%lang(fi) %{_datadir}/locale/fi/man
%lang(fr) %{_datadir}/locale/fr/man
%lang(hr) %{_datadir}/locale/hr/man
%lang(it) %{_datadir}/locale/it/man
%lang(ja) %{_datadir}/locale/ja/man
%lang(ko) %{_datadir}/locale/ko/man
%lang(nl) %{_datadir}/locale/nl/man
%lang(pl) %{_datadir}/locale/pl/man
%lang(pt) %{_datadir}/locale/pt/man
%lang(ro) %{_datadir}/locale/ro/man
%lang(ru) %{_datadir}/locale/ru/man
%lang(sl) %{_datadir}/locale/sl/man


%changelog
* Sun Dec 21 2008 Oden Eriksson <oeriksson@mandriva.com> 1.6e-9mdv2009.1
+ Revision: 317067
- rediffed some fuzzy patches
- use %%ldflags

* Tue Jun 17 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.6e-8mdv2009.0
+ Revision: 223146
- rebuild

* Tue Jan 15 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.6e-7mdv2008.1
+ Revision: 152898
- rebuild

* Tue Jan 15 2008 Thierry Vignaud <tvignaud@mandriva.com> 1.6e-6mdv2008.1
+ Revision: 152897
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Fri Aug 31 2007 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.6e-5mdv2008.0
+ Revision: 76380
- add lzma support to makewhatis too for indexing (updates P500)

* Tue Aug 21 2007 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.6e-4mdv2008.0
+ Revision: 68174
- update P500 to really set lzma as default format

* Fri Jun 22 2007 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.6e-3mdv2008.0
+ Revision: 43074
- add lzma to buildrequires otherwise it will build without support

* Thu Jun 07 2007 Per Øyvind Karlsen <peroyvind@mandriva.org> 1.6e-2mdv2008.0
+ Revision: 36785
- add lzma support (P500)
- drop useless & broken PreReq: setup
- cleanups

* Fri May 18 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 1.6e-1mdv2008.0
+ Revision: 28329
- Updated to 1.6e (new version from new maintainer, updated also Url and
  Source tags).
- Redid patches: i18n_whatis, new_sections, ro_usr, whatis2, security,
  mandirs, use_i18n_vars_in_a_std_way.
- Removed already applied patch lookon.
- Removed obsolete en/man.config.5 provided as a separate source, don't
  delete the one provided by upstream tarball.


* Sat Dec 09 2006 Pablo Saratxaga <pablo@mandriva.com> 1.5m2-7mdv2007.0
+ Revision: 94033
- rebuild
- ignore SIGPIPE signals, so no error messages are displayed when the pipe
  is broken before the formatting of the man page (bug #13349)

* Sat Dec 09 2006 Pablo Saratxaga <pablo@mandriva.com> 1.5m2-6mdv2007.1
+ Revision: 94015
- fix for the interface translations, and set a better value
  for default NLSPATH (bug #25806)
- improved the build of the manpages list, to avoid doubles
  (less disk access, and no more identiqual files (bug #25806)
- changed the path of the formated man pages from fsstd to fhs
  (/var/catman/xxxx to /var/cache/man/xxxx)
- call makewhatis with LANG="" for the English (default) man pages
  and create whatis files for orphaned languages
- fix for the interface translations, and set a better value
  for default NLSPATH (bug #25806)
- fixed makewhatis to not overwrite LANG value (reported by UTUMI Hirosi)
- added MAN_NAME and MAN_DESCRIPTION environement variables to makewhatis
  so that language-specific values can be defined
- i18n fixes and improvements to whatis and apropos (now recognizes
  LANGUAGE and only report a man page in only the first found language)
- calling awk with LC_ALL, as otherwise if the data is in a different
  encoding than the locale, the string handling doens't work (as the
  stream of bytes are not recognized as valid characters)
- Import man

* Sun Sep 17 2006 Pablo Saratxaga <pablo@mandriva.com> 1.5m2-6mdv
- define JNROFF in the config file so that it calls nroff and not directly
  groff (this is needed since the swith to utf-8 the i18n handling is
  done in nroff)
- converted man pages to utf-8
- enabled color output

* Tue Nov 22 2005 Pixel <pixel@mandriva.com> 1.5m2-4mdk
- patch301: use i18n vars in a std way (ie LANGUAGE first, and use the first variable set)

* Fri Jul 08 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.5m2-3mdk
- patch 300: add new POSIX sections (#16167)

* Tue Feb 08 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.5m2-2mdk
- rpmlint fixes

* Fri Jan 30 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.5m2-1mdk
- new release
- fix build
- rediff patches 6, 8, 10, 104, 201 and 300
- rediff and rename patch 101: bzip2 whatis part was merged upstream, only keep
  LANG managment part
- rediff patch 104, remove $(PREFIX) references that are obsoleted by
  "mandir=$RPM_BUILD_ROOT//usr/share/man" makeinstall argument:
- kill patches 3, 11, 16, 26, 100 and 108 (merged upstream)