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

%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: Plain TeX supplementary packages
Summary(ja): TeX Live: Plain TeX supplementary packages
Name: texlive-collection-plainextra
Version: 2009
Release: 3%{?_dist_release}
License: No Info, Public Domain, Freely redistributable without restriction, LPPL
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 Plain TeX supplementary packages: 
Add-on packages and macros that work with plain TeX.

This package contains the following CTAN packages: 
figflow: Flow text around a figure.
fixpdfmag: Fix magnification in PDFTeX.
font-change: Macros to Change Text and Math fonts in plain TeX.
fontch: Changing fonts, sizes and encodings in Plain TeX.
hyplain: Basic support for multiple languages in Plain TeX.
jsmisc: Miscellaneous macros from Joachim Schrod.
mkpattern: A utility for making hyphenation patterns.
newsletr: Macros for making newsletters with Plain TeX.
placeins-plain: Insertions that keep their place.
plgraph: The LaTeX picture mode, for use with Plain TeX.
plnfss: Font selection for Plain TeX.
resumemac: Plain TeX macros for resumes.
timetable: Generate timetables.
treetex: Draw trees.
typespec: Create font samplers.
varisize: Change font size in Plain TeX.
vertex: Styles for economics working papers and journals.

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

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

このパッケージは以下のようなパッケージ集です。
Plain TeX supplementary packages: 
Add-on packages and macros that work with plain TeX.

このパッケージは以下の CTAN パッケージを含んでいます： 
figflow: Flow text around a figure.
fixpdfmag: Fix magnification in PDFTeX.
font-change: Macros to Change Text and Math fonts in plain TeX.
fontch: Changing fonts, sizes and encodings in Plain TeX.
hyplain: Basic support for multiple languages in Plain TeX.
jsmisc: Miscellaneous macros from Joachim Schrod.
mkpattern: A utility for making hyphenation patterns.
newsletr: Macros for making newsletters with Plain TeX.
placeins-plain: Insertions that keep their place.
plgraph: The LaTeX picture mode, for use with Plain TeX.
plnfss: Font selection for Plain TeX.
resumemac: Plain TeX macros for resumes.
timetable: Generate timetables.
treetex: Draw trees.
typespec: Create font samplers.
varisize: Change font size in Plain TeX.
vertex: Styles for economics working papers and journals.

%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/plain/figflow/README.figflow
texmf-dist/tex/plain/figflow/figflow.tex
texmf-dist/tex/plain/fixpdfmag/fixpdfmag.tex
texmf-dist/doc/plain/font-change/README
texmf-dist/doc/plain/font-change/doc.pdf
texmf-dist/doc/plain/font-change/doc.tex
texmf-dist/tex/plain/font-change/font_antp_euler.tex
texmf-dist/tex/plain/font-change/font_antt.tex
texmf-dist/tex/plain/font-change/font_arev.tex
texmf-dist/tex/plain/font-change/font_bera_concrete.tex
texmf-dist/tex/plain/font-change/font_bera_euler.tex
texmf-dist/tex/plain/font-change/font_bera_fnc.tex
texmf-dist/tex/plain/font-change/font_bookman.tex
texmf-dist/tex/plain/font-change/font_century.tex
texmf-dist/tex/plain/font-change/font_charter.tex
texmf-dist/tex/plain/font-change/font_cm.tex
texmf-dist/tex/plain/font-change/font_cmbright.tex
texmf-dist/tex/plain/font-change/font_concrete.tex
texmf-dist/tex/plain/font-change/font_epigrafica_euler.tex
texmf-dist/tex/plain/font-change/font_epigrafica_palatino.tex
texmf-dist/tex/plain/font-change/font_iwona.tex
texmf-dist/tex/plain/font-change/font_kurier.tex
texmf-dist/tex/plain/font-change/font_palatino.tex
texmf-dist/tex/plain/font-change/font_times.tex
texmf-dist/tex/plain/font-change/font_utopia.tex
texmf-dist/doc/plain/fontch/README
texmf-dist/tex/plain/fontch/DSmac.tex
texmf-dist/tex/plain/fontch/TS1mac.tex
texmf-dist/tex/plain/fontch/bsymbols.tex
texmf-dist/tex/plain/fontch/fontch.tex
texmf-dist/doc/plain/hyplain/README
texmf-dist/doc/plain/hyplain/hydoc.pdf
texmf-dist/doc/plain/hyplain/hydoc.tex
texmf-dist/tex/plain/hyplain/hylang.tex
texmf-dist/tex/plain/hyplain/hypdfplain.ini
texmf-dist/tex/plain/hyplain/hyplain.tex
texmf-dist/tex/plain/hyplain/hyrules.tex
texmf-dist/doc/plain/jsmisc/deutsch.doc
texmf-dist/doc/plain/jsmisc/deutsch.dvi
texmf-dist/doc/plain/jsmisc/deutsch.tex
texmf-dist/doc/plain/jsmisc/idverb.doc
texmf-dist/doc/plain/jsmisc/idverb.dvi
texmf-dist/doc/plain/jsmisc/js-misc.dvi
texmf-dist/source/plain/jsmisc/History
texmf-dist/source/plain/jsmisc/INSTALL
texmf-dist/source/plain/jsmisc/Imakefile
texmf-dist/source/plain/jsmisc/License
texmf-dist/source/plain/jsmisc/Makefile
texmf-dist/source/plain/jsmisc/README
texmf-dist/source/plain/jsmisc/TODO
texmf-dist/source/plain/jsmisc/names.sty
texmf-dist/source/plain/jsmisc/xfig/text-2.1-doc.tex
texmf-dist/source/plain/jsmisc/xfig/text-2.1.fig
texmf-dist/source/plain/jsmisc/xfig/text-2.1.latex
texmf-dist/source/plain/jsmisc/xfig/text-3.1-doc.tex
texmf-dist/source/plain/jsmisc/xfig/text-3.1.latex
texmf-dist/tex/plain/jsmisc/cassette.tex
texmf-dist/tex/plain/jsmisc/idverb.tex
texmf-dist/tex/plain/jsmisc/js-misc.tex
texmf-dist/tex/plain/jsmisc/schild.tex
texmf-dist/tex/plain/jsmisc/sperr.tex
texmf-dist/tex/plain/jsmisc/xfig.tex
texmf-dist/doc/plain/mkpattern/README
texmf-dist/doc/plain/mkpattern/mkpatdoc.tex
texmf-dist/doc/plain/mkpattern/mkpatter.pdf
texmf-dist/doc/plain/mkpattern/mkpattern-exmpl.tex
texmf-dist/tex/plain/mkpattern/mkpatter.tex
texmf-dist/doc/plain/newsletr/italic.tex
texmf-dist/doc/plain/newsletr/lodriver.tex
texmf-dist/doc/plain/newsletr/losample.tex
texmf-dist/doc/plain/newsletr/newsletr.txt
texmf-dist/doc/plain/newsletr/newssamp.pdf
texmf-dist/doc/plain/newsletr/newssamp.tex
texmf-dist/doc/plain/newsletr/quote.tex
texmf-dist/doc/plain/newsletr/read.me
texmf-dist/doc/plain/newsletr/sample.pdf
texmf-dist/tex/plain/newsletr/newsletr.tex
texmf-dist/tex/plain/placeins-plain/placeins.tex
texmf-dist/doc/plain/plgraph/00readme.txt
texmf-dist/doc/plain/plgraph/autopict.ins
texmf-dist/doc/plain/plgraph/exmplcol.tex
texmf-dist/doc/plain/plgraph/exmplgrf.tex
texmf-dist/doc/plain/plgraph/exmplpfg.tex
texmf-dist/doc/plain/plgraph/exmplpic.tex
texmf-dist/source/plain/plgraph/autopict.ins
texmf-dist/tex/plain/plgraph/autopict.sty
texmf-dist/tex/plain/plgraph/color.tex
texmf-dist/tex/plain/plgraph/graphicx.tex
texmf-dist/tex/plain/plgraph/miniltx.tex
texmf-dist/tex/plain/plgraph/picture.tex
texmf-dist/tex/plain/plgraph/psfrag.tex
texmf-dist/doc/plain/plnfss/LPPL.txt
texmf-dist/doc/plain/plnfss/plnfss.txt
texmf-dist/doc/plain/plnfss/test-plnfss.tex
texmf-dist/tex/plain/plnfss/MIKmathf.tex
texmf-dist/tex/plain/plnfss/ams.pfd
texmf-dist/tex/plain/plnfss/il2cm.pfd
texmf-dist/tex/plain/plnfss/il2cmr.pfd
texmf-dist/tex/plain/plnfss/ly1lm.pfd
texmf-dist/tex/plain/plnfss/ot1cm.pfd
texmf-dist/tex/plain/plnfss/ot1cmr.pfd
texmf-dist/tex/plain/plnfss/ot4cm.pfd
texmf-dist/tex/plain/plnfss/plnfss.tex
texmf-dist/tex/plain/plnfss/qxlm.pfd
texmf-dist/tex/plain/plnfss/t1lm.pfd
texmf-dist/tex/plain/plnfss/t5cm.pfd
texmf-dist/tex/plain/plnfss/t5cmr.pfd
texmf-dist/tex/plain/plnfss/t5lm.pfd
texmf-dist/tex/plain/plnfss/ts1lm.pfd
texmf-dist/doc/plain/resumemac/README
texmf-dist/doc/plain/resumemac/sample_resume.tex
texmf-dist/tex/plain/resumemac/resumemac.tex
texmf-dist/tex/plain/timetable/timetable.tex
texmf-dist/doc/plain/treetex/epodd.bbl
texmf-dist/doc/plain/treetex/epodd.dvi
texmf-dist/doc/plain/treetex/epodd.tex
texmf-dist/doc/plain/treetex/readme
texmf-dist/doc/plain/treetex/tree_doc.bbl
texmf-dist/doc/plain/treetex/tree_doc.dvi
texmf-dist/doc/plain/treetex/tree_doc.tex
texmf-dist/tex/plain/treetex/classes.tex
texmf-dist/tex/plain/treetex/l_pic.tex
texmf-dist/tex/plain/treetex/treetex.tex
texmf-dist/doc/plain/typespec/TypeSpec.pdf
texmf-dist/doc/plain/typespec/TypeSpec.tex
texmf-dist/tex/plain/typespec/TypeSp01.tex
texmf-dist/tex/plain/typespec/TypeSp02.tex
texmf-dist/tex/plain/typespec/TypeSp03.tex
texmf-dist/tex/plain/typespec/TypeSp04.tex
texmf-dist/tex/plain/typespec/TypeSp05.tex
texmf-dist/tex/plain/typespec/TypeSp06.tex
texmf-dist/tex/plain/typespec/TypeSp07.tex
texmf-dist/tex/plain/typespec/TypeSp08.tex
texmf-dist/tex/plain/typespec/TypeSp09.tex
texmf-dist/tex/plain/typespec/TypeSp10.tex
texmf-dist/doc/plain/varisize/README
texmf-dist/tex/plain/varisize/10point.tex
texmf-dist/tex/plain/varisize/10pointss.tex
texmf-dist/tex/plain/varisize/11point.tex
texmf-dist/tex/plain/varisize/12point.tex
texmf-dist/tex/plain/varisize/14point.tex
texmf-dist/tex/plain/varisize/17point.tex
texmf-dist/tex/plain/varisize/20point.tex
texmf-dist/tex/plain/varisize/7point.tex
texmf-dist/tex/plain/varisize/8point.tex
texmf-dist/tex/plain/varisize/9point.tex
texmf-dist/doc/plain/vertex/READ.ME
texmf-dist/doc/plain/vertex/files.lst
texmf-dist/doc/plain/vertex/fntest.tex
texmf-dist/doc/plain/vertex/jepcont.tex
texmf-dist/doc/plain/vertex/test.tex
texmf-dist/doc/plain/vertex/twocol.tex
texmf-dist/doc/plain/vertex/users.lst
texmf-dist/doc/plain/vertex/vertest.tex
texmf-dist/doc/plain/vertex/vertex.doc
texmf-dist/doc/plain/vertex/vertex.hst
texmf-dist/doc/plain/vertex/vertex.pdf
texmf-dist/tex/plain/vertex/aer.sty
texmf-dist/tex/plain/vertex/ecnmet.sty
texmf-dist/tex/plain/vertex/jep.sty
texmf-dist/tex/plain/vertex/jet.sty
texmf-dist/tex/plain/vertex/jpe.sty
texmf-dist/tex/plain/vertex/ppt.sty
texmf-dist/tex/plain/vertex/qje.sty
texmf-dist/tex/plain/vertex/restud.sty
texmf-dist/tex/plain/vertex/vertex.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

## 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}

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-plainextra
- improved %%post

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