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

%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: Extra formats
Summary(ja): TeX Live: Extra formats
Name: texlive-collection-formatsextra
Version: 2009
Release: 3%{?_dist_release}
License: GPL+, LPPL, Freely redistributable without restriction, Knuth, No Info, Public Domain
Group: Applications/Publishing
URL:http://www.tug.org/texlive/

Requires: texlive = %{version}
Requires: texlive-collection-basic = %{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 Extra formats: 
A collection of TeX `formats', ie large-scale macro packages
designed to be dumped into .fmt file

This package contains the following CTAN packages: 
alatex: Abstract LaTeX.
edmac: Typeset scholarly edition.
eplain: Extended plain tex macros.
mltex: The MLTeX system.
physe: The PHYSE format.
phyzzx: A TeX format for physicists.
psizzl: A TeX format for physics papers.
startex: An XML-inspired format for student use.
texsis: Plain TeX macros for Physicists.
ytex: Macro package developed at MIT.

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

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

このパッケージは以下のようなパッケージ集です。
Extra formats: 
A collection of TeX `formats', ie large-scale macro packages
designed to be dumped into .fmt file

このパッケージは以下の CTAN パッケージを含んでいます： 
alatex: Abstract LaTeX.
edmac: Typeset scholarly edition.
eplain: Extended plain tex macros.
mltex: The MLTeX system.
physe: The PHYSE format.
phyzzx: A TeX format for physicists.
psizzl: A TeX format for physics papers.
startex: An XML-inspired format for student use.
texsis: Plain TeX macros for Physicists.
ytex: Macro package developed at MIT.

%package doc
Summary: TeX Live: Documentation files of %{name}
Group: Applications/Publishing
Requires: %{name} = %{version}-%{release}

%description doc
This package contains documentation files of %{name}.

%prep

%build

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

PREF=%{buildroot}%{tex_destdir}

manifest=(
texmf-dist/doc/otherformats/alatex/base/alatex.tex
texmf-dist/source/alatex/base/0areadme.txt
texmf-dist/source/alatex/base/COPYING
texmf-dist/source/alatex/base/Makefile
texmf-dist/source/alatex/base/README
texmf-dist/source/alatex/base/VERSION-1.0
texmf-dist/source/alatex/base/abugs.txt
texmf-dist/source/alatex/base/ainstall.txt
texmf-dist/source/alatex/base/alatex.dtx
texmf-dist/source/alatex/base/alatex.ltx
texmf-dist/source/alatex/base/amanifst.txt
texmf-dist/source/alatex/base/aunpack.ins
texmf-dist/source/alatex/base/aunpcked.txt
texmf-dist/source/alatex/base/testdist.dtx
texmf-dist/tex/alatex/base/metaclas.cfg
texmf-dist/doc/latex/edmac/COPYRIGHT
texmf-dist/doc/latex/edmac/braonain.tex
texmf-dist/doc/latex/edmac/copying
texmf-dist/doc/latex/edmac/ed-nfss.txt
texmf-dist/doc/latex/edmac/edmac.doc
texmf-dist/doc/latex/edmac/edstanza.doc
texmf-dist/doc/latex/edmac/edszadoc.tex
texmf-dist/doc/latex/edmac/features.tex
texmf-dist/doc/latex/edmac/readme
texmf-dist/source/latex/edmac/edmac.drv
texmf-dist/tex/generic/edmac/edmac.tex
texmf-dist/tex/generic/edmac/edmacfss.sty
texmf-dist/tex/generic/edmac/edstanza.tex
texmf-dist/tex/generic/edmac/tabmac.tex
texmf-dist/doc/eplain/AUTHORS
texmf-dist/doc/eplain/COPYING
texmf-dist/doc/eplain/ChangeLog
texmf-dist/doc/eplain/INSTALL
texmf-dist/doc/eplain/NEWS
texmf-dist/doc/eplain/PROJECTS
texmf-dist/doc/eplain/README
texmf-dist/doc/eplain/README.TOP
texmf-dist/doc/eplain/demo/Makefile
texmf-dist/doc/eplain/demo/lscommnt.tex
texmf-dist/doc/eplain/demo/xhyper.tex
texmf-dist/doc/eplain/doc/eplain.html
texmf-dist/doc/eplain/doc/eplain.pdf
texmf-dist/doc/eplain/doc/lscommnt.jpg
texmf-dist/doc/eplain/doc/xhyper.jpg
texmf-dist/doc/eplain/util/idxuniq
texmf-dist/doc/eplain/util/trimsee
texmf-dist/source/eplain/eplain-source-3.3.zip
texmf-dist/source/eplain/xeplain.tex
texmf-dist/tex/eplain/arrow.tex
texmf-dist/tex/eplain/btxmac.tex
texmf-dist/tex/eplain/eplain.aux
texmf-dist/tex/eplain/eplain.ini
texmf-dist/tex/eplain/eplain.tex
texmf-dist/doc/latex/mltex/README
texmf-dist/doc/latex/mltex/mltex.txt
texmf-dist/doc/latex/mltex/testmlft.dvi
texmf-dist/doc/latex/mltex/testmlft.tex
texmf-dist/doc/latex/mltex/testmlsw.dvi
texmf-dist/doc/latex/mltex/testmlsw.tex
texmf-dist/tex/latex/mltex/lo1enc.def
texmf-dist/tex/latex/mltex/mlltxchg.def
texmf-dist/tex/latex/mltex/mltex.sty
texmf-dist/tex/mltex/config/mltex.ini
texmf-dist/tex/physe/base/physe.tex
texmf-dist/tex/physe/base/physupdt.tex
texmf-dist/tex/physe/config/physe.ini
texmf-dist/doc/otherformats/phyzzx/base/phyzdoc.dvi
texmf-dist/doc/otherformats/phyzzx/base/phyzdoc.tex
texmf-dist/tex/phyzzx/base/myphyx.tex
texmf-dist/tex/phyzzx/base/phyzzx.fonts
texmf-dist/tex/phyzzx/base/phyzzx.local
texmf-dist/tex/phyzzx/base/phyzzx.plus
texmf-dist/tex/phyzzx/base/phyzzx.tex
texmf-dist/tex/phyzzx/config/phyzzx.ini
texmf-dist/doc/otherformats/psizzl/base/psizzl.commands
texmf-dist/doc/otherformats/psizzl/base/psizzl.doc
texmf-dist/source/psizzl/base/aaaread.me
texmf-dist/tex/psizzl/base/chapters.Psizzl
texmf-dist/tex/psizzl/base/citation.Psizzl
texmf-dist/tex/psizzl/base/fontdefs.Psizzl
texmf-dist/tex/psizzl/base/index.Psizzl
texmf-dist/tex/psizzl/base/institut.Psizzl
texmf-dist/tex/psizzl/base/letter.Psizzl
texmf-dist/tex/psizzl/base/lists.Psizzl
texmf-dist/tex/psizzl/base/macros.Psizzl
texmf-dist/tex/psizzl/base/memo.Psizzl
texmf-dist/tex/psizzl/base/mypsizzl.tex
texmf-dist/tex/psizzl/base/options.Psizzl
texmf-dist/tex/psizzl/base/output.Psizzl
texmf-dist/tex/psizzl/base/picture.Psizzl
texmf-dist/tex/psizzl/base/psizzl.tex
texmf-dist/tex/psizzl/base/publicat.Psizzl
texmf-dist/tex/psizzl/base/symbols.Psizzl
texmf-dist/tex/psizzl/base/thesis.Psizzl
texmf-dist/tex/psizzl/config/psizzl.ini
texmf-dist/doc/otherformats/startex/base/guide.pdf
texmf-dist/doc/otherformats/startex/base/ideas.pdf
texmf-dist/doc/otherformats/startex/base/startex.pdf
texmf-dist/source/startex/base/INSTALL
texmf-dist/source/startex/base/README
texmf-dist/source/startex/base/startex.bib
texmf-dist/source/startex/base/startex.dtx
texmf-dist/source/startex/base/startex.ins
texmf-dist/makeindex/startex/stxglo.ist
texmf-dist/makeindex/startex/stxind.ist
texmf-dist/tex/startex/base/a4-article.stx
texmf-dist/tex/startex/base/article.stx
texmf-dist/tex/startex/base/ifi-article.stx
texmf-dist/tex/startex/base/ifi-artikkel.stx
texmf-dist/tex/startex/base/startex.lan
texmf-dist/tex/startex/base/startex.tex
texmf-dist/doc/otherformats/texsis/base/COPYING
texmf-dist/doc/otherformats/texsis/base/Example.tex
texmf-dist/doc/otherformats/texsis/base/Fonts.tex
texmf-dist/doc/otherformats/texsis/base/INSTALL
texmf-dist/doc/otherformats/texsis/base/Install.tex
texmf-dist/doc/otherformats/texsis/base/MANIFEST
texmf-dist/doc/otherformats/texsis/base/Manual.fgl
texmf-dist/doc/otherformats/texsis/base/Manual.ref
texmf-dist/doc/otherformats/texsis/base/Manual.tbl
texmf-dist/doc/otherformats/texsis/base/Manual.tex
texmf-dist/doc/otherformats/texsis/base/NEWS
texmf-dist/doc/otherformats/texsis/base/README
texmf-dist/doc/otherformats/texsis/base/TXSapxF.doc
texmf-dist/doc/otherformats/texsis/base/TXScover.doc
texmf-dist/doc/otherformats/texsis/base/TXSdcol.doc
texmf-dist/doc/otherformats/texsis/base/TXSdoc.doc
texmf-dist/doc/otherformats/texsis/base/TXSdoc0.doc
texmf-dist/doc/otherformats/texsis/base/TXSdocM.doc
texmf-dist/doc/otherformats/texsis/base/TXSend.doc
texmf-dist/doc/otherformats/texsis/base/TXSenvmt.doc
texmf-dist/doc/otherformats/texsis/base/TXSeqns.doc
texmf-dist/doc/otherformats/texsis/base/TXSfigs.doc
texmf-dist/doc/otherformats/texsis/base/TXSfmts.doc
texmf-dist/doc/otherformats/texsis/base/TXSfonts.doc
texmf-dist/doc/otherformats/texsis/base/TXSinstl.doc
texmf-dist/doc/otherformats/texsis/base/TXSintro.doc
texmf-dist/doc/otherformats/texsis/base/TXSletr.doc
texmf-dist/doc/otherformats/texsis/base/TXSmisc.doc
texmf-dist/doc/otherformats/texsis/base/TXSprns.doc
texmf-dist/doc/otherformats/texsis/base/TXSrefs.doc
texmf-dist/doc/otherformats/texsis/base/TXSrevs.doc
texmf-dist/doc/otherformats/texsis/base/TXSruled.doc
texmf-dist/doc/otherformats/texsis/base/TXSsects.doc
texmf-dist/doc/otherformats/texsis/base/TXSsite.000
texmf-dist/doc/otherformats/texsis/base/TXSsymb.doc
texmf-dist/doc/otherformats/texsis/base/TXStags.doc
texmf-dist/doc/otherformats/texsis/base/index.tex
texmf-dist/doc/otherformats/texsis/base/letr
texmf-dist/doc/otherformats/texsis/base/penguin.eps
texmf-dist/doc/otherformats/texsis/base/penguin2.eps
texmf-dist/doc/otherformats/texsis/base/texsis.1
texmf-dist/doc/otherformats/texsis/base/texsis.el
texmf-dist/doc/otherformats/texsis/base/texsis.lsm
texmf-dist/bibtex/bst/texsis/texsis.bst
texmf-dist/tex/texsis/base/AIP.txs
texmf-dist/tex/texsis/base/CVformat.txs
texmf-dist/tex/texsis/base/Elsevier.txs
texmf-dist/tex/texsis/base/Exam.txs
texmf-dist/tex/texsis/base/Formletr.txs
texmf-dist/tex/texsis/base/IEEE.txs
texmf-dist/tex/texsis/base/PhysRev.txs
texmf-dist/tex/texsis/base/Spanish.txs
texmf-dist/tex/texsis/base/Swedish.txs
texmf-dist/tex/texsis/base/TXSconts.tex
texmf-dist/tex/texsis/base/TXSdcol.tex
texmf-dist/tex/texsis/base/TXSenvmt.tex
texmf-dist/tex/texsis/base/TXSeqns.tex
texmf-dist/tex/texsis/base/TXSfigs.tex
texmf-dist/tex/texsis/base/TXSfmts.tex
texmf-dist/tex/texsis/base/TXSfonts.tex
texmf-dist/tex/texsis/base/TXShead.tex
texmf-dist/tex/texsis/base/TXSinit.tex
texmf-dist/tex/texsis/base/TXSletr.tex
texmf-dist/tex/texsis/base/TXSmacs.tex
texmf-dist/tex/texsis/base/TXSmemo.tex
texmf-dist/tex/texsis/base/TXSprns.tex
texmf-dist/tex/texsis/base/TXSrefs.tex
texmf-dist/tex/texsis/base/TXSruled.tex
texmf-dist/tex/texsis/base/TXSsects.tex
texmf-dist/tex/texsis/base/TXSsite.tex
texmf-dist/tex/texsis/base/TXSsymb.tex
texmf-dist/tex/texsis/base/TXStags.tex
texmf-dist/tex/texsis/base/TXStitle.tex
texmf-dist/tex/texsis/base/Tablebod.txs
texmf-dist/tex/texsis/base/WorldSci.txs
texmf-dist/tex/texsis/base/color.txs
texmf-dist/tex/texsis/base/nuclproc.txs
texmf-dist/tex/texsis/base/printfont.txs
texmf-dist/tex/texsis/base/spine.txs
texmf-dist/tex/texsis/base/texsis.tex
texmf-dist/tex/texsis/base/thesis.txs
texmf-dist/tex/texsis/base/twin.txs
texmf-dist/tex/texsis/config/texsis.ini
texmf-dist/tex/ytex/base/ybase.mac
texmf-dist/tex/ytex/base/yfonts.mac
texmf-dist/tex/ytex/base/ylog.mac
texmf-dist/tex/ytex/base/ysite.mac
texmf-dist/tex/ytex/base/ytex-cm.tex
texmf-dist/tex/ytex/base/ytex.ieee
texmf-dist/tex/ytex/base/ytex.mac
texmf-dist/tex/ytex/base/ytex.mail
texmf-dist/tex/ytex/base/yusage.lst
texmf-dist/tex/ytex/base/yusage.tex
texmf-dist/tex/ytex/base/yuser.mac
)

%__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

## subpackages
grep "/texmf-dist/doc/" filelist.full > filelist.doc
cat filelist.doc filelist.full | sort | uniq -u > filelist.tmp
%__mv -f filelist.tmp filelist.full

%clean
%__rm -rf %{buildroot}

%post
%{exec_texhash}

rpm -q --quiet texlive-common || exit 0

echo -n "    "
echo -n "Running fmtutil ... " && %{exec_fmtutil} && echo "done."

exit 0


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

fi

exit 0

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

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

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

* Fri Oct 01 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2009-2
- generated by tlpdb2rpmspec 2009-2: tlpdb2rpmspec collection-formatsextra
- 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-formatsextra
