Package man-pages-ru: Specfile

%define LANG ru
#%define ENC1 KOI8-R
#%define ENC2 CP1251

Name: man-pages-%LANG
Version: 0.98
Release: alt13.M41.1

Summary: Russian translations of OS GNU/*/Linux manpages
Summary(ru_RU.KOI8-R): \xf2\xd5\xd3\xd3\xcb\xc9\xc5 \xd0\xc5\xd2\xc5\xd7\xcf\xc4\xd9 \xd3\xd4\xd2\xc1\xce\xc9\xc3 \xd2\xd5\xcb\xcf\xd7\xcf\xc4\xd3\xd4\xd7 \xd0\xcf \xef\xf3 GNU/*/Linux
License: distributable
Group: System/Internationalization
Url: http://www.linuxshare.ru/projects/trans
Packager: Aleksandr Blokhin <sass@altlinux.org>
BuildArch: noarch

Icon: books-%LANG.xpm
Source: %url/manpages-ru-%version.tar.bz2
Source1: manpages-ALT.tar.bz2
#Source2: man-postfix.tar.bz2
Source3: tcb-0.9.8.7-man-ru.tar.bz2
Source4: man-gzip-ru.tar.bz2
Source6: bash.tar.bz2
Source7: man-pages-ru-0.94-alt-Makefile
Source8: man-ssh.tar.bz2
Source9: manpages-angel.tar.bz2
Source10: manpages-boojuman.tar.bz2
Source11: manpages-ASP.tar.bz2
Source12: man-pages-ru-autofs.tar.bz2
Source13: man-pages-security-ru-1.0.tar.bz2
Source14: man-pages-ru-extra.tar.bz2

Patch0: man-pages-ru-0.98-alt-combo.patch.bz2
#Patch2: postfix-alt.patch.bz2
Patch3: install.1.patch.gz
Patch4: ln.1.patch.gz
Patch5: manpages-ru-0.98-alt-typo-fix.patch.gz
Patch6: mat-functions-alt.patch.gz

Obsoletes: man-%LANG, manpages-%LANG, man-pages-%LANG-%ENC1, man-pages-%LANG-%ENC2, man-pages-security-%LANG
PreReq: man >= 1.6e-alt1

%description
A small collection of man pages (documentation) from the Linux Documentation
Project (LDP) translated to russian.  The man pages are organized into the
following sections: Section 1, user commands; Section 2, system
calls; Section 3, libc calls; Section 4, devices (e.g., hd, sd); Section 5,
file formats and protocols (e.g., wtmp, /etc/passwd, nfs); Section 6, games
(intro only); Section 7, conventions, macro packages, etc. (e.g., nroff,
ascii); and Section 8, system administration.

%description -l ru_RU.KOI8-R
\xee\xc5\xc2\xcf\xcc\xd8\xdb\xc1\xd1 \xcb\xcf\xcc\xcc\xc5\xcb\xc3\xc9\xd1 \xd3\xd4\xd2\xc1\xce\xc9\xc3 \xd2\xd5\xcb\xcf\xd7\xcf\xc4\xd3\xd4\xd7\xc1 \xc9\xda \xf0\xd2\xcf\xc5\xcb\xd4\xc1 \xe4\xcf\xcb\xd5\xcd\xc5\xce\xd4\xc1\xc3\xc9\xc9 \xce\xc1
\xec\xc9\xce\xd5\xcb\xd3, \xce\xc1 \xd2\xd5\xd3\xd3\xcb\xcf\xcd \xd1\xda\xd9\xcb\xc5.  \xf3\xd4\xd2\xc1\xce\xc9\xc3\xd9 \xd2\xd5\xcb\xcf\xd7\xcf\xc4\xd3\xd4\xd7\xc1 \xcf\xd2\xc7\xc1\xce\xc9\xda\xcf\xd7\xc1\xce\xd9 \xd3\xcc\xc5\xc4\xd5\xc0\xdd\xc9\xcd
\xcf\xc2\xd2\xc1\xda\xcf\xcd: \xd3\xc5\xcb\xc3\xc9\xd1 1, \xcb\xcf\xcd\xc1\xce\xc4\xd9 \xd0\xcf\xcc\xd8\xda\xcf\xd7\xc1\xd4\xc5\xcc\xd1; \xd3\xc5\xcb\xc3\xc9\xd1 2, \xd3\xc9\xd3\xd4\xc5\xcd\xce\xd9\xc5 \xd7\xd9\xda\xcf\xd7\xd9;
\xd3\xc5\xcb\xc3\xc9\xd1 3, \xc6\xd5\xce\xcb\xc3\xc9\xc9 \xc2\xc9\xc2\xcc\xc9\xcf\xd4\xc5\xcb\xc9 \xd1\xda\xd9\xcb\xc1 C; \xd3\xc5\xcb\xc3\xc9\xd1 4, \xd5\xd3\xd4\xd2\xcf\xca\xd3\xd4\xd7\xc1 (\xce\xc1\xd0\xd2\xc9\xcd\xc5\xd2,
hd, sd); \xd3\xc5\xcb\xc3\xc9\xd1 5, \xc6\xcf\xd2\xcd\xc1\xd4\xd9 \xc6\xc1\xca\xcc\xcf\xd7 \xc9 \xd0\xd2\xcf\xd4\xcf\xcb\xcf\xcc\xd9 (\xce\xc1\xd0\xd2\xc9\xcd\xc5\xd2, wtmp,
/etc/passwd, nfs); \xd3\xc5\xcb\xc3\xc9\xd1 6, \xc9\xc7\xd2\xd9 (\xd4\xcf\xcc\xd8\xcb\xcf \xd7\xd7\xc5\xc4\xc5\xce\xc9\xc5); \xd3\xc5\xcb\xc3\xc9\xd1 7,
\xd3\xcf\xc7\xcc\xc1\xdb\xc5\xce\xc9\xd1, \xcd\xc1\xcb\xd2\xcf-\xd0\xc1\xcb\xc5\xd4\xd9, \xc9 \xd4. \xd0. (\xce\xc1\xd0\xd2\xc9\xcd\xc5\xd2, nroff, ascii); \xc9 \xd3\xc5\xcb\xc3\xc9\xd1
8, \xd5\xd4\xc9\xcc\xc9\xd4\xd9 \xc1\xc4\xcd\xc9\xce\xc9\xd3\xd4\xd2\xc1\xd4\xcf\xd2\xc1.

%prep
%setup -q -a1 -a3 -a4 -a6 -a8 -a9 -a10 -a11 -a12 -a13 -a14 -n manpages-%LANG-%version
%patch0 -p1
#%patch2 -p1
%__rm -f $RPM_BUILD_DIR/manpages-%LANG-%version/man1/install.1
%__rm -f $RPM_BUILD_DIR/manpages-%LANG-%version/man1/ln.1
%__rm -f $RPM_BUILD_DIR/manpages-%LANG-%version/man1/ldd.1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p0
%__cp %SOURCE7 $RPM_BUILD_DIR/manpages-%LANG-%version/Makefile

cat > $RPM_BUILD_DIR/manpages-%LANG-%version/man3/strcasestr.3 << EOF
.so man3/strstr.3
EOF

%install
%__mkdir_p $RPM_BUILD_ROOT%_docdir/security-%LANG
%__mkdir_p $RPM_BUILD_ROOT%_mandir/%LANG/man{1,2,3,4,5,6,7,8,9,n}
%__mkdir_p $RPM_BUILD_ROOT%_cachedir/man/%LANG/cat{1,2,3,4,5,6,7,8,9,n}

make install \
	INSTALL="%__install -p -m644" \
	INSTALLPATH=$RPM_BUILD_ROOT%_mandir \
	LANG_SUBDIR=%LANG \
	COMPRESS=none \
	#
	
cd man-pages-security-ru-1.0
make install \
        INSTALL="%__install -p -m644" \
        INSTALLMAN=$RPM_BUILD_ROOT%_mandir \
        INSTALLDOC=$RPM_BUILD_ROOT%_docdir/security-%LANG \
        LANG_SUBDIR=%LANG \
        COMPRESS=none \
        #

#echo %ENC1 >$RPM_BUILD_ROOT%_mandir/%LANG/.charset
echo >$RPM_BUILD_ROOT%_cachedir/man/%LANG/whatis

%post -p /etc/cron.daily/makewhatis

%postun
if [ "$1" = 0 -a ! -d %_mandir/%LANG ]; then
       %__rm -rf %_cachedir/man/%LANG
fi

%files
%doc CREDITS NEWS FAQ
%_docdir/security-%LANG/*
%_mandir/*

%attr(3775,root,man) %dir %_cachedir/man/%LANG
%attr(644,cacheman,man) %ghost %_cachedir/man/%LANG/whatis

%defattr(644,root,man,2775)
%_cachedir/man/%LANG/cat*

%changelog
* Fri Aug 01 2008 Andrey Cherepanov <cas@altlinux.ru> 0.98-alt13.M41.1
- backport to 4.1 branch

* Thu Apr 03 2008 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt13
- bug #15178

* Wed Feb 06 2008 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt12
- Removed %_mandir/%LANG/.charset. Bug #9364.

* Thu Sep 27 2007 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt11
- Package merged with man-pages-security-ru
- Fixed bugs: #9662, #10431, #11641, #12345, #12635
- Added new translations: osec.1, tr.1, tsort.1, vsftpd.conf.5, sconfig.8

* Thu Mar 15 2007 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt10
- Added new translations: cat.1, fuser.1, uname.1, MB_CUR_MAX.3, MB_LEN_MAX.3, 
  psignal.3, strsignal.3, badblocks.8
- Updated: index.3, strcasecmp.3, strfry.3, strlen.3, strstr.3
- Fixed typos in: sudoers.5

* Sun Nov 05 2006 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt9
- Added new translations: autofs.5, auto.master.5, autofs.8, automount.8,
  mkfs.8, rename.1, sort.1
- Updated: acos.3, asin.3, atan.3, atanh.3, atan2.3, cos.3, cosh.3, hypot.3, 
  sin.3, sinh.3, sqrt.3, tan.3
- Fixed typos in: wget.1, fdatasync.2, mmap2.2, stat.2, sync.2
- Renamed llab.3 to llabs.3

* Sat May 27 2006 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt8
- Added new translations: 
  arch.1 from man-pages-ru by ASP Linux
  ethtool.8 by Aleksander N. Gorohovski <angel@feht.dgtu.donetsk.ua>
  hotplug.8 by Aleksandr Savvin <savvin@mail.ru>
- Updated links in sed.1

* Fri Mar 31 2006 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt7
- Added new translations: djview.1, last.1, lilo.8, logrotate.8
- Updated umount.8
- Dropped obsoleted translations: ldd.1, postfix manual pages.
- Removed vim.1

* Tue Nov 15 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt6
- Added: chroot.1, syslogd.1, which.1, fstab.5, setserial.8, sysctl.8, umount.8
- Updated: cut.1, bash.1
- Linked sh.1 to bash.1

* Thu Oct 13 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt5
- Added: cut.1, login.1, sleep.1, tty.1, who.1, dmesg.8, lspci.8
- Updated: man.1

* Fri Sep 16 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt4
- Added: baby.1, iconv.1, man.1, sex.6, fdformat.8
- Updated: access.2, muttrc.5, xinetd.conf.5
- Retranslated: install.1, ln.1

* Thu Jun 09 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt3
- Dropped obsoleted man pages: gpg.1, gpgv.1

* Mon May 09 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt2
- updated: chattr.1
- added: logname.1, lsattr.1, stat.1
- translations by Aleksander N.Gorohovski merged in one tar archive.

* Fri Apr 22 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.98-alt1
- 0.98
- added: eject.1, chattr.1, getcontext.2, getpagesize.2, getpriority.2, 
  koi8-r.7, ldp.7, x25.7
- updated: fcntl.2, muttrc.5

* Wed Mar 09 2005 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.97-alt3
- added: id.1
- updated: mount.8

* Fri Dec 17 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.97-alt2
- added: tar.1, mount.8
- updated: scp.1, ssh.1, ssh-agent.1, ssh-keygen.1, sftp.1, ssh-add.1,
  ssh-copy-id.1, ssh-keyscan.1, sftp-server.8

* Tue Aug 03 2004 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.97-alt1
- man-pages-ru-0.97: 
  added: clone.2, mmap2.2, personality.2, pread.2, pwrite.2, syscall.2, 
  sysinfo.2, umask.2
- updated: pipe.2, sync.2
  
* Wed Jul 07 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.96-alt2
- Updated gpg.1, gpgv.1

* Mon Jun 21 2004 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.96-alt1
- man-pages-ru-0.96:
  added getdents.2, getitimer.2, getpeername.2, getresgid.2
  killpg.2, vm86.2, uname.2, uselib.2, ustat.2, vhangup.2, wait4.2
- updated mknod.2, unlink.2, write.2
- man-pages-ru-ALT: 
  added rsyncd.conf.5
  
* Thu May 27 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.95-alt2
- Added faq.6 and fstype.8

* Sat May 22 2004 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.95-alt1
- man-pages-ru-0.95:
  added kill.2
  updated proc.5 and termcap.5.
- man-pages-ru-ALT:
  su.1 from coreutils replaced with new one from SimplePAMApps
  minor fixes in rpm.8, resolver.5

* Fri Apr 16 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.94-alt1
- man-pages-ru updated up to 0.94
- tcb translations updated up to 0.9.8.7
- added Makefile
- updated patches, removed obsoleted

* Fri Apr 09 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt31
- Added rsync.1 by \xe7\xcf\xcc\xcf\xd7\xc9\xce \xf3\xc5\xd2\xc7\xc5\xca <svgol@mail.ru>

* Mon Mar 22 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt30
- Added bash.1 by "Russian Man Pages" project <http://ln.com.ua/~openxs/projects/man/>;

* Fri Mar 12 2004 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt29
- Added nice.1, master.8, qmgr.8 by \xe7\xcf\xcc\xcf\xd7\xc9\xce \xf3\xc5\xd2\xc7\xc5\xca <svgol@mail.ru>
- Updated wget.1 by \xee. \xfb\xc1\xc6\xcf\xd2\xcf\xd3\xd4\xcf\xd7 <admin@program.net.ua>

* Tue Dec 16 2003 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt28
- Updated gpg.1 and added gpgv.1

* Thu Jul 17 2003 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt27
- Added: ar.1, gunzip.1, gzexe.1, gzip.1, zcat.1, zcmp.1, zdiff.1,
  zforce.1, zgrep.1, zmore.1, znew.1.

* Thu Jul 10 2003 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt26
- Fixed typo's in procmail.1

* Wed Jul 09 2003 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt25
- Added updated chgrp.1, fitchmail.1
- Updated man-pages-ru-1.41.patch.gz

* Sun Apr 20 2003 Dmitry V. Levin <ldv@altlinux.org> 0.7-alt24
- Packaged %%_cachedir/man/%%LANG/whatis file.
- Changed %%_cachedir/man/%%LANG permissions
  from %%attr(755,root,root) to %%attr(3775,root,man).
- Changed %%_cachedir/man/%%LANG/cat* permissions
  from %%attr(775,root,man) to %%attr(2775,root,man).

* Fri Dec 20 2002 Aleksandr Blokhin 'Sass' <sass@altlinux.ru> 0.7-alt23
- Added gendiff.1, lzop.1, autofs.8

* Tue Nov 26 2002 Aleksandr Blokhin (Sass) <sass@altlinux.ru> 0.7-alt22
- Updated man pages for postfix
- Added pppdump.8, pppstats.8, wget.1, procmail.1, sed.1
- Fixed Provides and russian description

* Mon Nov 04 2002 Dmitry V. Levin <ldv@altlinux.org> 0.7-alt21
- Merged subpackages back to single package;
  requires recent man.
- Rewritten %%install script.
- Updated summary and description.

* Wed Jul 17 2002 Sass <sass@altlinux.ru> 0.7-alt20
- fixed typo's in ssh.1

* Fri Jun 14 2002 Sass <sass@altlinux.ru> 0.7-alt19
- updated muttrc.5

* Mon Jun 03 2002 Sass <sass@altlinux.ru> 0.7-alt18
- corrected some mistakes

* Mon May 27 2002 Sass <sass@altlinux.ru> 0.7-alt17
- added translations apt.conf.5, sources.list.5, apt-cache.8,
  apt-cdrom.8, apt-config.8, apt-get.8, apt.8

* Tue May 14 2002 Sass <sass@altlinux.ru> 0.7-alt16
- added gpg.1, vim.1, xinetd.conf.5

* Wed Apr 10 2002 Sass <sass@altlinux.ru> 0.7-alt15
- updates in chgrp.1, chmod.1, chown.1, cp.1 to man-pages-1.41
- added nmap.1, ldif.5, apt.8, apt-cdrom.8
- fixed typo

* Mon Mar 18 2002 Sass <sass@altlinux.ru> 0.7-alt14
- updated update-alternatives.8

* Mon Mar 11 2002 Sass <sass@altlinux.ru> 0.7-alt13
- fixed typo

* Thu Mar 05 2002 Sass <sass@altlinux.ru> 0.7-alt12
- Bugfix release

* Mon Mar 04 2002 Sass <sass@altlinux.ru> 0.7-alt11
- Added man-tcb-ru.tar.bz2 from Dmitry V. Levin <ldv@altlinux.ru>
- Added initlog.1, xinetd.log.8 from Alex Savvin <savvin@mail.ru>
- Updated install.1

* Sun Feb 24 2002 Sass <sass@altlinux.ru> 0.7-alt10
- Added man-postfix.tar.bz2 by Alex Savvin <savvin@mail.ru>
- Added patch for man-postfix

* Thu Feb 21 2002 Sass <sass@altlinux.ru> 0.7-alt9
- Added w.1

* Sun Feb 03 2002 Sass <sass@altlinux.ru> 0.7-alt8
- Updated translations: sudoers.5, sudo.8, visudo.8

* Wed Jan 09 2002 Sass <sass@altlinux.ru> 0.7-alt7
- Added Summary & description in CP1251 encoding

* Tue Nov 27 2001 Dmitry V. Levin <ldv@alt-linux.org> 0.7-alt6
- Updated package requires.
- Updated %post scripts.

* Mon Nov 26 2001 Sass <sass@altlinux.ru> 0.7-alt5
- Fixed access rights in man5
- Added new translations: xinetd.8, ftpd-BSD.8
- Removed makewhatis.%LANG script.
- Updated spec

* Fri Nov 23 2001 Dmitry V. Levin <ldv@alt-linux.org> 0.7-alt3
- Fixed %%postun scripts.
- Updated makewhatis.%LANG script.
- Updated package requires.

* Thu Nov 22 2001 Sass <sass@altlinux.ru> 0.7-alt2
- added manpage ftpd-BSD.8

* Sat Nov 3 2001 Sass <sass@altlinux.ru> 0.7-alt1
- 0.7
- Updated spec
- Added scripts
- manpages-RE now known as manpages-ALT
- Updated manpages: make-ssh-known-hosts.1, scp.1, sftp.1,
  ssh-add.1, ssh-agent.1, ssh-copy-id.1, ssh-keygen.1,
  ssh-keyscan.1, ssh.1, sftp-server.8, sshd.8

* Mon Mar 19 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.6-ipl4mdk
- FHSification.
- Updated manpages.
- Kicked out obsoleted scripts.

* Wed Feb 14 2001 AEN <aen@logic.ru> 0.6-ipl3mdk
- adder rpm.8 & rpm2cpio.8 from Dmitry Levin

* Fri Jan 26 2001 AEN <aen@logic.ru> 0.6-ipl2mdk
- two packages
- 0.6
- rpm.8 added

* Tue Jul 18 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.1-12mdk
- BM

* Mon Jun 26 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.1-11mdk
- use mandir macro in order to be ok when switching to /usr/share/man as
  following FHS.

* Tue Apr 11 2000 Denis Havlik <denis@mandrakesoft.com> 0.1-10mdk
- Group: System/Internationalization
- added "Prereq: sed grep man"
- spechelper, dir permissions

* Wed Dec 22 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- added 'man drake' from Aleksey Smirnov

* Fri Nov 19 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- moved makewhatis.%LANG from /usr/local/sbin to /usr/sbin

* Fri Oct 29 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- fixed the colours of the icon

* Fri Jul 23 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
- adapted the rpm package to the Mandrake format (added icon, makewhatis
  scripts, %post script, improved %files etc)

* Tue May 20 1999 Alexei Mikhalev <leha@linuxfan.com>
- Initial version.