## -*- coding: utf-8-unix -*-
## NOTE: This spec file is generated by tlpdb2rpmspec 2009-3: 
## tlpdb2rpmspec collection-documentation-mongolian

%bcond_with firstbuild

%define tex_destdir	%{_datadir}
%define texmf		%{tex_destdir}/texmf
%define texlive_src	%{tex_destdir}/texlive-sources
%define build_tex_destdir	%{buildroot}%{tex_destdir}
%define build_texmf	%{buildroot}%{texmf}

%define exec_mktexlsr  [ -x %{_bindir}/texconfig-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/texconfig-sys rehash
%define exec_texhash  [ -x %{_bindir}/texhash ] && PATH=%{_bindir}:$PATH %{_bindir}/texhash
%define exec_updmap   [ -x %{_bindir}/updmap-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/updmap-sys --nostop
%define exec_fmtutil  [ -x %{_bindir}/fmtutil-sys ] && PATH=%{_bindir}:$PATH %{_bindir}/fmtutil-sys --all >/dev/null 2>&1
%define exec_upddeffont    [ -x %{_sbindir}/update-defaultfont ] && %{_sbindir}/update-defaultfont 2> /dev/null
%define vartexfonts %{_var}/lib/texmf

%define __find_provides	%{nil}
%define __find_requires	%{nil}
%define __perl_provides	%{nil}
%define __perl_requires	%{nil}

Autoreq: 0

Summary: TeX Live: Mongolian documentation
Summary(ja): TeX Live: Mongolian documentation
Name: texlive-collection-documentation-mongolian
Version: 2009
Release: 3%{?_dist_release}
License: LPPL
Group: Applications/Publishing
URL:http://www.tug.org/texlive/

Requires: texlive = %{version}


Requires(post):		texlive = %{version}
Requires(postun):	texlive = %{version}
BuildRequires:		texlive-sources = %{version}

BuildArch:	noarch
Buildroot:	%{_tmppath}/%{name}-%{version}-root

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	munepi

%description
The TeX Live software distribution offers a complete TeX system for a
variety of Unix, Macintosh, Windows and other platforms. It
encompasses programs for editing, typesetting, previewing and printing
of TeX documents in many different languages, and a large collection
of TeX macros and font libraries.

The distribution includes extensive general documentation about TeX,
as well as the documentation for the included software packages.

This package is a collection of Mongolian documentation: 


This package contains the following CTAN packages: 
lshort-mongol: Short introduction to LaTeX, in Mongolian.

%description -l ja
TeX Live ソフトウェアディストリビューションは、
さまざまな Unix, Macintosh, Windows、および
他のプラットホームに対して完全な TeX システムを提供します。
多くの異なった言語を含む TeX ドキュメントの
編集、組版、閲覧、印刷するためのプログラム、
そして、TeX マクロやフォントライブラリの大きなコレクションを
同梱しています。

このディストリビューションは
同梱しているソフトウェアパッケージのためのドキュメントばかりでなく、
TeX に関するたくさんの一般的なドキュメントを含んでいます。

このパッケージは以下のようなパッケージ集です。
Mongolian documentation: 


このパッケージは以下の CTAN パッケージを含んでいます: 
lshort-mongol: Short introduction to LaTeX, in Mongolian.

%prep

%build

%install
[ -n "%{buildroot}" -a "%{buildroot}" != / ] && %__rm -rf %{buildroot}

PREF=%{buildroot}%{tex_destdir}

manifest=(
texmf-dist/doc/latex/lshort-mongol/00README
texmf-dist/doc/latex/lshort-mongol/CHANGES
texmf-dist/doc/latex/lshort-mongol/MANIFEST
texmf-dist/doc/latex/lshort-mongol/Makefile
texmf-dist/doc/latex/lshort-mongol/README
texmf-dist/doc/latex/lshort-mongol/TODO
texmf-dist/doc/latex/lshort-mongol/TRANSLATIONS
texmf-dist/doc/latex/lshort-mongol/fixdate.pl
texmf-dist/doc/latex/lshort-mongol/lshort-mn.pdf
texmf-dist/doc/latex/lshort-mongol/src/appendix.tex
texmf-dist/doc/latex/lshort-mongol/src/biblio.tex
texmf-dist/doc/latex/lshort-mongol/src/contrib.tex
texmf-dist/doc/latex/lshort-mongol/src/custom.tex
texmf-dist/doc/latex/lshort-mongol/src/fancyhea.sty
texmf-dist/doc/latex/lshort-mongol/src/graphic.tex
texmf-dist/doc/latex/lshort-mongol/src/lshort-a5.tex
texmf-dist/doc/latex/lshort-mongol/src/lshort-base.tex
texmf-dist/doc/latex/lshort-mongol/src/lshort-mn.tex
texmf-dist/doc/latex/lshort-mongol/src/lshort.sty
texmf-dist/doc/latex/lshort-mongol/src/lssym.tex
texmf-dist/doc/latex/lshort-mongol/src/math.tex
texmf-dist/doc/latex/lshort-mongol/src/mylayout.sty
texmf-dist/doc/latex/lshort-mongol/src/overview.tex
texmf-dist/doc/latex/lshort-mongol/src/spec.tex
texmf-dist/doc/latex/lshort-mongol/src/things.tex
texmf-dist/doc/latex/lshort-mongol/src/title.tex
texmf-dist/doc/latex/lshort-mongol/src/typeset.tex
)

%__mkdir_p ${PREF}/texmf-dist
for i in "${manifest[@]}"; do 
    %__install -D %{texlive_src}/$i ${PREF}/$i
done

## info
%__rm -f %{buildroot}%{_infodir}/dir
%__gzip -9nf %{buildroot}%{_infodir}/*info* ||:

## man
## man t1* files are provided by t1utils
for i in t1ascii t1asm t1binary t1disasm t1mac t1unmac; do
    %__rm %{buildroot}%{_mandir}/man*/${i}.* ||:
done

## man some files are provided by psutils
for i in epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps fixpspps fixscribeps fixtpps fixwfwps fixwpps fixwwps getafm includeres psbook psmerge psnup psresize psselect pstops; do
    %__rm %{buildroot}%{_mandir}/man*/${i}.* ||:
done

## fix perl path
for i in source/metapost/expressg/expressg.dtx \
         doc/metapost/expressg/n2mpsprl.prl \
         doc/latex/songbook/contrib/crd2sb/crd2sb; do 
    [ -f %{build_texmf}-dist/${i} ] && \
        %__sed -i -e "s|^#!/usr/local/bin/perl|#!%{__perl}|" %{build_texmf}-dist/${i}
done

## remove asymptote directries, which provides asymptote package
find %{buildroot} -regex ".*asymptote.*" | xargs %__rm -rf
# find %{buildroot} -name "Makefile" | xargs %__rm -f

# ## remove xindy
# find %{buildroot} -regex ".*xindy.*" | xargs %__rm -rf

# ## remove tex4ht
# find %{buildroot} -regex ".*tex4ht.*" | xargs %__rm -rf

## remove arch dependent binaries
%__rm -f %{build_texmf}-dist/source/latex/splitindex/splitindex-{OpenBSD,Linux}-i386

## remove unpackaging files
find %{buildroot} | %__grep -e "\.\(la\|a\)$" | xargs %__rm -f
find %{buildroot} | %__grep -e "\.\(diff\|patch\)$" | xargs %__rm -f

## Files list
find %{buildroot} -type f -or -type l | \
    %__sed -e "s|%{buildroot}||g" > filelist.full

find %{buildroot}%{texmf}-dist -type d | \
    %__sed -e "s|^%{buildroot}|%dir |" \
           -e "s|$|/|"             >> filelist.full

%clean
%__rm -rf %{buildroot}

%post
%{exec_texhash}

exit 0


%postun
if [ "$1" = 0 ]; then
    %{exec_texhash}

fi

exit 0

%files -f filelist.full
%defattr(-,root,root)

%changelog
* Fri Jan 14 2011 Munehiro Yamamoto <munepi@vinelinux.org> 2009-3
- generated by tlpdb2rpmspec 2009-3: tlpdb2rpmspec collection-documentation-mongolian
- improved %%post

* Fri Oct 01 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
- generated by tlpdb2rpmspec 2009-2: tlpdb2rpmspec collection-documentation-mongolian
- removed arch dependent binaries (texlive-collection-latexextra)
- fixed perl path
- improved updmap process in %%post and %%postun

* Sat Aug 07 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-1
- generated by tlpdb2rpmspec 2009-1: tlpdb2rpmspec collection-documentation-mongolian