File texlive-bin.spec of Package texlive-bin

#
# spec file for package texlive-bin (Version 2010)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           texlive-bin
# Remark: For package texlive its self see next sub package which is build for noarch
# Remark: In case of enabling ttf2pk we need also freetype(1) within the line of BuildRequires
BuildRequires:  bison cairo cairo-devel dialog ed expat fdupes fftw3-devel flex freeglut-devel freetype2-devel gcc-c++ gd-devel ghostscript_any gsl-devel jpeg libicu libicu-devel libjpeg-devel libpng-devel libpoppler-devel ncurses-devel netpbm readline-devel t1lib t1lib-devel unzip xaw3d-devel xorg-x11-devel xorg-x11-util-devel xz zip zziplib zziplib-devel
Url:            http://www.tug.org/texlive/
License:        GPLv2+ ; TeX-License ..
Summary:        Binary coded programs for package texlive
Requires(prereq): /bin/date /bin/ln
Group:          Productivity/Publishing/TeX/Base
Version:        2010
Release:        2
Source0:        ftp://tug.org/historic/systems/texlive/2010/texlive-20100722-source.tar.xz
Source1:        ftp://tug.org/historic/systems/texlive/2010/texlive-20100722-texmf.tar.xz
Source2:        ftp://tug.org/historic/systems/texlive/2010/texlive-20100826-extra.tar.xz
Source6:        do.mklists
Source7:        do.exec
Source8:        sh.rellink
Source10:       rc.config.texlive
Source11:       SuSEconfig.texlive
Source12:       texlive.cron
Source13:       texlive.sh
Source14:       texlive.csh
Source15:       fc-texlive.conf
Source16:       fc-t1-texlive.conf
Source20:       texlive-import
Source21:       texlive-import.8
Source22:       README.import
Source30:       texlive-bin-rpmlintrc
Source31:       dot.dvipsrc
Source40:       list-fonts-extra
Source50:       nobody.c
Source51:       nobody.8
Patch0:         source.dif
Patch1:         source-configure.dif
Patch2:         source-xdvizilla.dif
Patch3:         source-arraysubs.dif
Patch5:         source-texdoc.dif
Patch6:         source-dviutils.dif
Patch7:         source-psutils-flip.dif
Patch8:         source-psutils.dif
Patch10:        source-poppler.dif
Patch11:        source-lacheck.dif
Patch12:        source-warns.dif
Patch13:        source-x11r7.dif
Patch17:        source-64.dif
Patch19:        source-dvipng.dif
Patch40:        texmf.dif
Patch41:        texmf-astro.dif
Patch42:        texmf-musixtex.dif
Patch43:        texmf-lowercase-arabicore.dif
Patch44:        texmf-pubform-bib.dif
Patch45:        texmf-jadetex.dif
Patch46:        texmf-bbold11.dif
AutoReqProv:    on
Prefix:         /
Prefix:         /usr/bin
#
# psutils -- is also available as the package psutils and therefore
#	     not necessary required, enabling the resulting psutils
#	     in texlive-tools cause dependency on texlive package
%bcond_with		psutils

%{expand: %%global options %(mktemp /tmp/texlive-opts.XXXXXXXX)}
%global _varlib		%{_localstatedir}/lib
%global _libexecdir	%{_prefix}/lib

%define _texmf_doc	%{_datadir}/texmf
%define _texmf_dist	%{_datadir}/texmf
%define _texmf_main	%{_libexecdir}/texmf
%define _texmf		\{%{_texmf_dist},%{_texmf_main}\}

%define _texbindir	%{_libexecdir}/texmf/bin
%define _texscrdir	%{_texmf_dist}/bin/noarch
%define _texinfodir	%{_texmf_main}/doc/info
%define _texmandir	%{_texmf_main}/doc/man
%define _texcnfdir	%{_sysconfdir}/texmf
%define _texvardir	%{_varlib}/texmf
%define _texcache	%{_localstatedir}/cache/texmf
%define _fontcache	%{_texcache}/fonts
#
%define _x11bin		%{_prefix}/bin
%define _x11lib		%{_libdir}
%define _x11data	%{_datadir}/X11
%define _x11inc		%{_includedir}
%define _appdefdir	%{_x11data}/app-defaults
#
%define isbin() %{?1:%exclude %*}\
%nil
%define nobin() %{?1:%*}\
%nil
#
%define bin_package(d) \
Summary:        Binary coded programs for package texlive%{?1:-%{1}}\
Requires(prereq): /bin/date /bin/ln\
Group:          %{!-d:Productivity/Publishing/TeX/Base}%{-d:Development/Languages/Other}\
AutoReqProv:    on\
%description -n texlive-bin%{?1:-%{1}}\
This package provides the binary coded programs for package texlive%{?1:-%{1}}.\
For a description see package texlive%{?1:-%{1}}.\
%nil
#
%define texhash\
    mkdir -p var/adm/SuSEconfig\
    touch    var/adm/SuSEconfig/run-texhash\
    if test -z "$YAST_IS_RUNNING" -a -x /sbin/conf.d/SuSEconfig.texlive ; then\
	atexit() {\
	    /sbin/conf.d/SuSEconfig.texlive\
	}\
	trap atexit EXIT ERR\
    fi\
%nil
#
%define posthash()   %post   -n texlive%{?1:-%{1}}\
%{texhash}\
%{run_suseconfig_fonts}\
%nil
#
%define postunhash() %postun -n texlive%{?1:-%{1}}\
%{?1:%{texhash}}\
%{run_suseconfig_fonts}\
%nil
#

%description
This package provides the binary coded programs for package texlive.
For a description see package texlive.

%package        -n texlive
License:        GPLv2+ ; TeX-License ..
Summary:        The Base System of TeXLive
Provides:       TeX Dvips PicTeX
Requires(prereq): texlive-bin = %{version}-%{release}
Requires(prereq): coreutils ed findutils grep permissions sed
Requires(post):   %fillup_prereq %install_info_prereq %suseconfig_fonts_prereq
Requires(postun): %install_info_prereq %suseconfig_fonts_prereq
Requires(interp): /usr/bin/env /usr/bin/perl
Requires:       /usr/bin/clear /usr/bin/dialog /bin/ed perl-Tk ghostscript_x11 cron
Obsoletes:      te_pscm te_etex te_pdf tetex
Conflicts:      te_eplai te_ams ntex
Suggests:       texlive-doc texlive-fonts-extra
Group:          Productivity/Publishing/TeX/Base
BuildArch:      noarch

%description -n texlive
After installing texlive and the package texlive-latex, find a large
selection of documentation for TeX, LaTeX, and various layout styles in
/usr/share/texmf/doc.

TeX (pronounced tech) is an interpreter for text formatting and was
developed by Donald E. Knuth.  It works with control and macro commands
on a text file. Working with TeX is similar to typesetting methods.
LaTeX is a complex macro package that removes the cryptical TeX
interface and does most of the work for the user.

TeX uses special fonts produced by the MetaFont program. Various
printer drivers and an X11 viewer are also included in this package.
The teTeX package is based on the standard TeX package of Karl Berry,
which makes configuration much easier. It is also possible to use
PostScript fonts. A real PostScript printer is required, however. If
the ghostscript (gs) package is installed, all drivers for printing and
viewing can use these fonts. Note, however, that the fonts included in
the ghostscript package are not identical to Adobe's PostScript fonts.
The copyright prohibids us to include them on the CD.

Besides these features, the programs MakeIndex (for producing indexes)
and BibTeX (for literature data processing) exist.

The texlive package includes a full texmf tree, many programs like tex,
dvips, etc., shell script configuration, and a big collection of
documentations. This package is easily configured by the script
texconfig and has multilanguage options.



Authors:
--------
    Karl Berry <karl@cs.umb.edu>
    Tim Morgan
    Tomas Rokicki
    Donald Ervin Knuth
    Thomas Esser <te@informatik.uni-hannover.de>
    Sebastian Rahtz


%package     -n texlive-doc
License:        GPLv2+ ; TeX-License ..
Summary:        The documentation of the TeXLive Base System
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-doc
This package includes the main documentation of the TeXLive Base
System.  The LaTeX documentation can be found in the package
texlive-latex-doc.



Authors:
--------
    Karl Berry <karl@cs.umb.edu>
    Tim Morgan
    Tomas Rokicki
    Donald Ervin Knuth
    Thomas Esser <te@informatik.uni-hannover.de>
    Sebastian Rahtz

%package     -n texlive-devel
License:        GPLv2+ ; TeX-License ..
Provides:       WEB Kpathsea
Requires(prereq): texlive-bin-devel = %{version}-%{release}
Obsoletes:      te_kpath te_web
Conflicts:      tetex
Summary:        The WEB tools, the headers and library of the Kpathsea tools
Group:          Development/Languages/Other
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-devel
The purpose of the Kpathsea library is to return a file name from a
list of directories.  This package provides the static library and the
header files for compiling and linking programs with Kpathsea support.
For the normal use of TeX and LaTeX, this package is not required.

WEB is a programming language designed to force the programmer to write
the documentation during programming.  For example, Donald Erwin Knuth
has written his typesetting program TeX in WEB.

The tools tangle and weave are used to produce the ready to compile
source code in Pascal and the documentation in TeX.

This package is not required for the use of TeX or LaTeX.

Authors:
--------
    Karl Berry <karl@cs.umb.edu>
    Olaf Weber <olaf@infovore.xs4all.nl>
    Fabrice Popineau <popineau@ese-metz.fr>
    Ignacio  Zabala
    Donald Erwin Knuth
    Howard Trickey
    Pavel Curtis


%package     -n texlive-bin-devel
License:        GPLv2+ ; TeX-License ..
%bin_package -d devel


%package     -n texlive-cjk
License:        GPLv2+ ; TeX-License ..
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-bin-cjk = %{version}-%{release}
Obsoletes:      te_ptex cjk-latex
Conflicts:      tetex
Summary:        LaTeX Macro Package for CJK (Chinese/Japanese/Korean)
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-cjk
CJK LaTeX is a macro package for LaTeX to enable typesetting Chinese,
Japanese, and Korean. It supports (simultaneously) various CJK
encodings, such as Big5, GB, JIS, KS, and CNS.

Authors:
--------
    Werner Lemberg <wl@gnu.org>



%package     -n texlive-bin-cjk
License:        GPLv2+ ; TeX-License ..
%bin_package cjk


%package     -n texlive-arab
License:        GPLv2+ ; TeX-License ..
Provides:       ArabTeX
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Summary:        (La)TeX Macro Package for Arab and Hebrew
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-arab
This package consist of at least two packages. The ArabTeX package
extends the capabilities of (La)TeX to generate Arabic and Hebrew text.
The Arabi package provides the Right-to-Left scripts support for TeX
without the need of any external preprocessor.

Authors:
--------
    Klaus Lagally <lagally@informatik.uni-stuttgart.de>
    Youssef Jabri


%package     -n texlive-metapost
License:        GPLv2+ ; TeX-License ..
Provides:       MetaPost
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-bin-metapost = %{version}-%{release}
Obsoletes:      te_mpost
Conflicts:      tetex
Summary:        All about MetaPost
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-metapost
This package provides MetaPost, which is a program with a similar macro
language as MetaFont, but, in comparison to MetaFont, the output is not
a bitmap, but in PostScript.

If familiar with the language of MetaFont, this program will provide an
excellent tool for drawing. This can happens interactively, with a
file, or by an other program.



Authors:
--------
    John D. Hobby
    Ulrik Vieth
    Taco Hoekwater



%package     -n texlive-bin-metapost
License:        GPLv2+ ; TeX-License ..
%bin_package metapost


%package     -n texlive-fonts-extra
License:        GPLv2+ ; TeX-License ..
Summary:        Extra fonts for TeX Live
Suggests:       texlive-fonts-extra-doc
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-fonts-extra
Following font will be found in this package:

 Asana-Math -- A font to typeset maths in Xe(La)TeX.
 albertus --
 allrunes -- Fonts and LaTeX package for almost all runes.
 antiqua -- the URW Antiqua Condensed Font.
 antp -- Antykwa Poltawskiego: a Type 1 family of Polish traditional type.
 antt -- Antykwa Torunska: a Type 1 family of a Polish traditional type.
 apl -- Fonts for typesetting APL programs.
 ar -- Capital A and capital R ligature for Apsect Ratio.
 archaic -- A collection of archaic fonts.
 arev -- Fonts and LaTeX support files for Arev Sans.
 ascii -- Support for IBM "standard ASCII" font.
 astro -- Astronomical (planetary) symbols.
 atqolive --
 augie -- Calligraphic font for typesetting handwriting.
 auncial-new -- Artificial Uncial font and LaTeX support macros.
 aurical -- Calligraphic fonts for use with LaTeX in T1 encoding.
 barcodes -- Fonts for making barcodes.
 bayer -- Herbert Bayers Universal Font For Metafont.
 bbding -- A symbol (dingbat) font and LaTeX macros for its use.
 bbm -- "Blackboard-style" cm fonts.
 bbm-macros -- LaTeX support for "blackboard-style" cm fonts.
 bbold -- Sans serif blackboard bold.
 belleek -- Free replacement for basic MathTime fonts.
 bera -- Bera fonts.
 blacklettert1 -- T1-encoded versions of Haralambous old German fonts.
 boisik -- A font inspired by Baskerville design.
 bookhands -- A collection of book-hand fonts.
 braille -- Support for braille.
 brushscr -- A handwriting script font.
 calligra -- Calligraphic font.
 carolmin-ps -- Adobe Type 1 format of Carolingian Minuscule fonts.
 cherokee -- A font for the Cherokee script.
 clarendo --
 cm-lgc -- Type 1 CM-based fonts for Latin, Greek and Cyrillic.
 cmbright -- Computer Modern Bright fonts.
 cmll -- Symbols for linear logic.
 cmpica -- A Computer Modern Pica variant.
 coronet --
 courier-scaled -- Provides a scaled Courier font.
 cryst -- Font for graphical symbols used in crystallography.
 cyklop -- The Cyclop typeface.
 dancers -- Font for Conan Doyle's "The Dancing Men".
 dice -- A font for die faces.
 dictsym -- DictSym font and macro package
 dingbat -- Two dingbat symbol fonts.
 doublestroke -- Typeset mathematical double stroke symbols.
 dozenal -- Typeset documents using base twelve numbering (also called
  "dozenal")
 duerer -- Computer Duerer fonts.
 duerer-latex -- LaTeX support for the Duerer fonts.
 ean -- Macros for making EAN barcodes.
 ecc -- Sources for the European Concrete fonts.
 eco -- Oldstyle numerals using EC fonts.
 eiad -- Traditional style Irish fonts.
 eiad-ltx -- LaTeX support for the eiad font.
 elvish -- Fonts for typesetting Tolkien Elvish scripts.
 epigrafica -- A Greek and Latin font.
 epsdice -- A scalable dice "font".
 esvect -- Vector arrows.
 eulervm -- Euler virtual math fonts.
 euxm --
 feyn -- A font for in-text Feynman diagrams.
 fge -- A font for Frege's Grundgesetze der Arithmetik.
 foekfont -- The title font of the Mads Fok magazine.
 fonetika -- Support for the danish "Dania" phonetic system.
 fourier -- Using Utopia fonts in LaTeX documents.
 fouriernc -- Use New Century Schoolbook text with Fourier maths fonts.
 frcursive -- French cursive hand fonts.
 garamond --
 genealogy -- A compilation genealogy font.
 gfsartemisia -- A modern Greek font design.
 gfsbodoni -- A Greek and Latin font based on Bodoni.
 gfscomplutum -- A Greek font with a long history.
 gfsdidot -- A Greek font based on Didot's work.
 gfsneohellenic -- A Greek font in the Neo-Hellenic style.
 gfssolomos -- A Greek-alphabet font.
 gothic -- A collection of old German-style fonts.
 greenpoint -- The Green Point logo.
 grotesq -- the URW Grotesk Bold Font.
 hands -- Pointing hand font.
 hfbright -- The hfbright fonts.
 hfoldsty -- Old style numerals with EC fonts.
 ifsym -- A collection of symbols.
 inconsolata -- A monospaced font, with support files for use with TeX.
 initials -- Adobe Type 1 decorative initial fonts.
 iwona -- A two-element sans-serif font.
 junicode -- A TrueType font for mediaevalists.
 kixfont -- A font for KIX codes.
 knuthotherfonts --
 kpfonts -- A complete set of fonts for text and mathematics.
 kurier -- A two-element sans-serif typeface.
 lettrgth --
 lfb -- A Greek font with normal and bold variants.
 libertine -- Use the font Libertine with LaTeX.
 libris -- Libris ADF fonts, with LaTeX support.
 linearA -- Linear A script fonts.
 logic -- A font for electronic logic design.
 lxfonts -- Set of slide fonts based on CM.
 ly1 -- Support for LY1 LaTeX encoding.
 marigold --
 mathabx -- Three series of mathematical symbols.
 mathdesign -- Mathematical fonts to fit with particular text fonts.
 mnsymbol -- Mathematical symbol font for Adobe MinionPro.
 nkarta -- A "new" version of the karta cartographic fonts.
 ocherokee -- LaTeX Support for the Cherokee language.
 ogham -- Fonts for typesetting Ogham script.
 oinuit -- LaTeX Support for the Inuktitut Language.
 optima --
 orkhun -- A font for orkhun script.
 osmanian -- Osmanian font for writing Somali.
 pacioli -- Fonts designed by Fra Luca de Pacioli in 1497.
 pclnfss -- Font support for current PCL printers.
 phaistos -- Disk of Phaistos font.
 phonetic -- MetaFont Phonetic fonts, based on Computer Modern.
 pigpen -- A font for the pigpen (or masonic) cipher.
 psafm --
 punk -- Donald Knuth's punk font.
 recycle -- A font providing the "recyclable" logo.
 sauter -- Wide range of design sizes for CM fonts.
 sauterfonts -- Use sauter fonts in LaTeX.
 semaphor -- Semaphore alphabet font.
 simpsons -- MetaFont source for Simpsons characters.
 skull -- A font to draw a skull.
 staves -- Typeset Icelandic staves and runic letters.
 tapir -- A simple geometrical font.
 tengwarscript -- LaTeX support for using Tengwar fonts.
 trajan -- Fonts from the Trajan column in Rome.
 umtypewriter -- Fonts to typeset with the xgreek package.
 univers --
 universa -- Herbert Bayer's 'universal' font.
 venturisadf -- Venturis ADF fonts collection.
 wsuipa -- International Phonetic Alphabet fonts.
 yfonts -- Support for old German fonts.
 zefonts -- Virtual fonts to provide T1 encoding from existing fonts.

%package     -n texlive-fonts-extra-doc
License:        GPLv2+ ; TeX-License ..
Summary:        The documentation for extra fonts of TeX Live
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-fonts-extra-doc
The documentation for extra fonts of TeX Live


%package     -n texlive-context
License:        GPLv2+ ; TeX-License ..
Provides:       CONTeXT ConTeXt
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(interp): /usr/bin/env /usr/bin/perl /usr/bin/ruby
Obsoletes:      te_cont
Conflicts:      tetex
Summary:        The conTeXt system depending on pdfTeX
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-context
The conTeXt macro package is written in TeX and, depending on the
configuration, is able to use the pdf output format.



Authors:
--------
    Hans Hagen <pragma@pi.net>
    Ton Otten <pragma@pi.net>


%package     -n texlive-omega
License:        GPLv2+ ; TeX-License ..
Provides:       Omega Lambda Antomega Aleph Lamed
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-bin-omega = %{version}-%{release}
Requires:       ghostscript_x11
Obsoletes:      te_omega
Conflicts:      tetex
Summary:        Omega, an extended TeX/LaTeX version with unicode
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-omega
The Omega typesetting system, an extension of TeX, is designed for
typesetting of all the world's languages. It normally  uses the unicode
character encoding standard as internal representation.

If this extension used together with the macro package LaTeX, this
version of Omega is called Lambda.

Authors:
--------
    John Plaice <plaice@cse.unsw.edu.au>
    Yannis Haralambous <yannis@fluxus-virus.com>



%package     -n texlive-bin-omega
License:        GPLv2+ ; TeX-License ..
%bin_package omega


%package     -n texlive-xetex
License:        GPLv2+ ; TeX-License ..
Provides:       XeTeX XeLaTeX
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-context = %{version}
Requires(prereq): texlive-bin-xetex = %{version}-%{release}
Conflicts:      tetex
Summary:        XeTeX, an extended TeX/LaTeX version for unicode
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-xetex
The XeTeX typesetting system is based on a merger of Donald Knuth's TeX
system with Unicode and modern font technologies.

If this extension used together with the macro package LaTeX, this
version of XeTeX is called XeLaTeX.

Authors:
--------
    Various <nrsi@sil.org>



%package     -n texlive-bin-xetex
License:        GPLv2+ ; TeX-License ..
%bin_package xetex


%package     -n texlive-dvilj
License:        GPLv2+ ; TeX-License ..
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-bin-dvilj = %{version}-%{release}
Obsoletes:      te_dvilj
Conflicts:      tetex
Summary:        Printer drivers for LaserJets (obsolete)
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-dvilj
This package contains drivers for various LaserJets. In most cases,
these drivers are not used because, with the programs dvips and
ghostscript, not only the same print quality is reached, but, due to
the intermediate PostScript step, some very useful graphical features
are given.

Authors:
--------
    Gustaf Neumann <neumann@wu-wien.ac.at>
    Karl Berry <kb@cs.umb.edu>



%package     -n texlive-bin-dvilj
License:        GPLv2+ ; TeX-License ..
%bin_package dvilj


%package     -n texlive-latex
License:        GPLv2+ ; TeX-License ..
Provides:       LaTeX
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-bin-latex = %{version}-%{release}
Requires(post): %install_info_prereq
Requires(postun): %install_info_prereq
Obsoletes:      te_latex latex-beamer latex-pgf latex-ucs
Conflicts:      tetex
Suggests:       texlive-latex-doc texlive-fonts-extra
Group:          Productivity/Publishing/TeX/Base
Summary:        All About LaTeX
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-latex
This package provides LaTeX. To be exact, LaTeX2e, and a huge amount
software for LaTeX.  This package is required by most (La)TeX
documents.

Authors:
--------
    Leslie Lamport <lamport@pa.dec.com>
    Johannes Braams
    David Carlisle
    Alan Jeffrey
    Frank Mittelbach <frank.mittelbach@uni-mainz.de>
    Chris Rowley
    Rainer Schöpf
    Markus Kohm <markus.kohm@gmx.de>
    Members of the LaTeX3 project


%package     -n texlive-latex-doc
License:        GPLv2+ ; TeX-License ..
Summary:        All documentation about LaTeX
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-latex-doc
This package includes all documentation about LaTeX.



Authors:
--------
    Leslie Lamport <lamport@pa.dec.com>
    Johannes Braams
    David Carlisle
    Alan Jeffrey
    Frank Mittelbach <frank.mittelbach@uni-mainz.de>
    Chris Rowley
    Rainer Schöpf
    Markus Kohm <markus.kohm@gmx.de>
    Members of the LaTeX3 project



%package     -n texlive-bin-latex
License:        GPLv2+ ; TeX-License ..
%bin_package latex


%package     -n texlive-tools
License:        GPLv2+ ; TeX-License ..
Provides:       TeX-Tools detex dviutils lacheck
%if %{with psutils}
Provides:       psutils
%else
Requires:       psutils
%endif
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-bin-tools = %{version}-%{release}
Group:          Productivity/Publishing/TeX/Base
Summary:        Utilities like DviToDvi, PSToPS, DeTeX, and LaCheck
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-tools
The DeTeX filter removes TeX and LaTeX macros.

The LaCheck utility is a syntax checker for LaTeX documents.

The DviToDvi utilities are

dvibook       rearranges pages into book signatures, adds blank pages
as needed
dviselect     selects pages and page ranges
dvitodvi      performs general page rearrangement of selected pages
dviconcat     concatenation of DVI files

Three simple scripts for scaling DIN A4 pages and rearranging two by
two onto a DIN A4 page (a4toa5) are included. The number of pages must
be even (which can be done by odd2even or dvibook).

Authors:
--------
    Angus J. C. Duggan <angus@harlequin.co.uk>
    Chris Torek (University of Maryland)
    Daniel Trinkle <trinkle@cs.purdue.edu>
    Kresten Krab Thorup <auc-tex_mgr@iesd.auc.dk>
    Per Abrahamsen <abraham@dina.kvl.dk>

%if %{with psutils}
The PSToPS utilities are

psbook        rearranges pages into signatures
psselect      selects pages and page ranges
pstops        performs general page rearrangement and selection
psnup         put multiple pages per physical sheet of paper
psresize      alter document paper size
epsffit       fits an EPSF file to a given bounding box

You will find a README under /usr/share/doc/packages/psutils/ which
also describes several perl-scripts for importing PostScript files. A
manual page for each ps utility is also included.

Authors:
--------
    Angus J. C. Duggan <angus@harlequin.co.uk>
    Chris Torek (University of Maryland)
    Daniel Trinkle <trinkle@cs.purdue.edu>
    Kresten Krab Thorup <auc-tex_mgr@iesd.auc.dk>
    Per Abrahamsen <abraham@dina.kvl.dk>
%endif

%package     -n texlive-bin-tools
License:        GPLv2+ ; TeX-License ..
%bin_package tools


%package     -n texlive-tex4ht
License:        GPLv2+ ; TeX-License ..
Provides:       TeX4ht
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-bin-tex4ht = %{version}-%{release}
Requires:       zip unzip
Summary:        Convert (La)TeX to HTML/XML
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-tex4ht
Tex4ht does not parse (La)TeX source. Instead, Tex4ht uses (La)TeX
itself to produce a non-standard DVI file that it can then process.
This technique gives TeX4ht the robustness characteristic of
restricted-syntax systems such as hyperlatex and gellmu.

Authors:
--------
    Eitan M. Gurari <gurari@cse.ohio-state.edu>



%package     -n texlive-bin-tex4ht
License:        GPLv2+ ; TeX-License ..
%bin_package tex4ht


%package     -n texlive-ppower4
License:        GPLv2+ ; TeX-License ..
Provides:       PPower4
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Summary:        Post Process presentations in PDF
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-ppower4
PPower4 is used to post process presentations in PDF format which were
prepared using (La)TeX to add dynamic effects. The PDF files can be
created with pdf(La)Tex, (La)Tex or with standard (La)TeX and then
converted to PDF with dvipdfm(x).

Authors:
--------
    Klaus Guntermann <guntermann@iti.informatik.tu-darmstadt.de>


%package     -n texlive-xmltex
License:        GPLv2+ ; TeX-License ..
Provides:       XmlTeX xmltex PassiveTeX passivetex
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-bin-xmltex = %{version}-%{release}
Summary:        Typesetting XML with TeX
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-xmltex
xmltex is a system for typesetting XML files with TeX. It may be used
on its own or in conjunction with another TeX format. (LaTeX is assumed
for most examples).

xmltex supports the XML Namespace Recommendation. Arbitrary prefixes
may be used in document instances and in definition files. It supports
any encoding that matches ASCII in the first 127 positions. UTF-8,
latin-1, and KOI8-R are included in the distribution. Other encodings
may be trivially added.

Further documentation may be obtained by running manual.tex through
LaTeX.

Authors:
--------
    David Carlisle
    Sebastian Rahtz



%package     -n texlive-bin-xmltex
License:        GPLv2+ ; TeX-License ..
%bin_package xmltex


%package     -n texlive-jadetex
License:        GPLv2+ ; TeX-License ..
Provides:       JadeTeX jadetex
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-bin-jadetex = %{version}-%{release}
Summary:        TeX Processor for OpenJade
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-jadetex
With Sebastian Rahtz's macro package jadetex, it is possible to process
the output of the TeX back-end for OpenJade and produce DVI or PDF
files. Resulting DVI files are viewable with xdvi or printable like any
other DVI file.

Authors:
--------
    Sebastian Rahtz <s.rahtz@elsevier.co.uk>
    Ian Castle



%package     -n texlive-bin-jadetex
License:        GPLv2+ ; TeX-License ..
%bin_package jadetex


%package     -n texlive-musictex
License:        GPLv2+ ; TeX-License ..
Provides:       MusiXTeX MusicTeX musictex
Requires(prereq): texlive = %{version}
Requires(prereq): texlive-latex = %{version}
Requires(prereq): texlive-bin-musictex = %{version}-%{release}
Summary:        MusiXTeX and MusicTeX
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-musictex
This packages is only usable for TeX experts with musical ambitions. It
contains a music TeX format file musixtex for direct usage onto TeX
music files. LaTeX users should use the corresponding style file.  For
a description, look under /usr/share/texmf/doc/texlive-musictex/.

Authors:
--------
    Daniel Taupin <taupin@lps.u-psud.fr>
    Ross Mitchell <rmm@dar.csiro.au>
    Andreas Egler <Andreas_Egler@wob.maus.de>



%package     -n texlive-bin-musictex
License:        GPLv2+ ; TeX-License ..
%bin_package musictex


%package     -n texlive-nfs
License:        GPLv2+ ; TeX-License ..
Obsoletes:      te_nfs
Conflicts:      texlive
Conflicts:      texlive-doc
Conflicts:      texlive-bin
Conflicts:      texlive-devel
Conflicts:      texlive-bin-devel
Conflicts:      texlive-cjk
Conflicts:      texlive-bin-cjk
Conflicts:      texlive-arab
Conflicts:      texlive-metapost
Conflicts:      texlive-bin-metapost
Conflicts:      texlive-fonts-extra
Conflicts:      texlive-fonts-extra-doc
Conflicts:      texlive-context
Conflicts:      texlive-omega
Conflicts:      texlive-bin-omega
Conflicts:      texlive-xetex
Conflicts:      texlive-bin-xetex
Conflicts:      texlive-dvilj
Conflicts:      texlive-bin-dvilj
Conflicts:      texlive-latex
Conflicts:      texlive-doc-latex
Conflicts:      texlive-bin-latex
Conflicts:      texlive-tools
Conflicts:      texlive-bin-tools
Conflicts:      texlive-tex4ht
Conflicts:      texlive-bin-tex4ht
Conflicts:      texlive-ppower4
Conflicts:      texlive-xmltex
Conflicts:      texlive-bin-xmltex
Conflicts:      texlive-jadetex
Conflicts:      texlive-bin-jadetex
Conflicts:      texlive-musictex
Conflicts:      texlive-bin-musictex
Requires:       /usr/sbin/showmount
Summary:        For NFS clients mounting the TeX/LaTeX system
Group:          Productivity/Publishing/TeX/Base
AutoReqProv:    on
BuildArch:      noarch

%description -n texlive-nfs
This small package provides a script which makes it easy to mount the
full TeXLive system of a SuSE Linux server over NFS.  You will find a
short description in /usr/share/doc/packages/texlive-nfs/README.



Authors:
--------
    Werner Fink <werner@suse.de>


%prep
  OS=%{_target_os}
%ifarch noarch
  CPU=%{_build_cpu}
%else
  CPU=%{_target_cpu}
%endif
%ifarch ia64
  RPM_OPT_FLAGS=$(echo "${RPM_OPT_FLAGS}"|sed -r 's/-O[0-9]?/-O1/g')
%endif
  XCFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -D_POSIX_C_SOURCE=200803L -D_XOPEN_SOURCE=600 -D_BSD_SOURCE"
  XCXXFLAGS="$XCFLAGS"
  cflags ()
  {
      local flag=$1; shift
      case "${RPM_OPT_FLAGS}" in
      *${flag}*) return
      esac
      if test -n "$1" && gcc -Werror $flag -S -o /dev/null -xc   /dev/null > /dev/null 2>&1 ; then
	  local var=$1; shift
	  eval $var=\${$var:+\$$var\ }$flag
      fi
      if test -n "$1" && g++ -Werror $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
	  local var=$1; shift
	  eval $var=\${$var:+\$$var\ }$flag
      fi
  }
  gcc -v
  cflags -std=gnu89		 XCFLAGS
  cflags -fno-const-strings	 XCFLAGS XCXXFLAGS
  cflags -fPIC			 XCFLAGS XCXXFLAGS
  cflags -Wno-write-strings	 XCFLAGS XCXXFLAGS
  cflags -Wno-char-subscripts	 XCFLAGS XCXXFLAGS
  cflags -Wno-unused		 XCFLAGS XCXXFLAGS
  cflags -Wno-uninitialized	 XCFLAGS XCXXFLAGS
  cflags -Wno-return-type	 XCFLAGS XCXXFLAGS
  cflags -Wno-parentheses	 XCFLAGS XCXXFLAGS
  cflags -Wno-sign-compare	 XCFLAGS XCXXFLAGS
  cflags -Wno-unprototyped-calls XCFLAGS
  cflags -pipe			 XCFLAGS XCXXFLAGS
  XLDFLAGS=""
# XCPIE="-fPIE"
# XLPIE="-pie"
  XCPIE=""
  XLPIE=""
%ifarch noarch
  HOST=%{_host_cpu}-suse-%{_host_os}
  BUILD=%{_build_cpu}-suse-%{_build_os}
%else
  HOST=%{_target_cpu}-suse-%{_host_os}
  BUILD=%{_target_cpu}-suse-%{_build_os}
%endif
  BINARY=${CPU}-${OS}
  VENDOR="%{vendor}"
  VENDOR="${VENDOR%%%%,*}"
  # Generate the Options file
  exec 6>&1
  exec 1>|%{options}

  # System wide configuration
  echo CPU=\"$CPU\"
  echo BINARY=\"${BINARY%%-gnu*}\"
  echo XCFLAGS=\"$XCFLAGS\"
  echo XCXXFLAGS=\"$XCXXFLAGS\"
  echo XLDFLAGS=\"-Wl,-warn-common $XLDFLAGS\"
  echo HOST=\"${HOST%%-gnu*}\"
  echo BUILD=\"${BUILD%%-gnu*}\"
  echo XCPIE=\"$XCPIE\"
  echo XLPIE=\"$XLPIE\"

  echo export XCFLAGS XCXXFLAGS XLDFLAGS XCPIE XLPIE HOST BUILD BINARY

  # Do not include e.g. from manual build
  echo unset TEXINPUTS TEXMF HOME

  # Environment for configuration
  echo CONFIG_SHELL=/bin/bash
  echo CFLAGS=\"$XCFLAGS\"
  echo CXXFLAGS=\"$XCXXFLAGS\"
  echo LDFLAGS=\"-Wl,-warn-common $XLDFLAGS\"
  echo CXX=g++
  echo VENDOR=\"${VENDOR}\"
  echo ARCH_LIB=%{_lib}
  echo export CC CXX CFLAGS CXXFLAGS LDFLAGS VENDOR PATH CONFIG_SHELL ARCH_LIB

  # Do not run TeX engine in fmtutil with batchmode
  echo batchmode=no
  echo export batchmode
%ifnarch hppa
  echo ulimit -s unlimited
%else
  # This is the maximum on hppa
  echo ulimit -s 81920
%endif

  # Source the rellink shell function
  echo . %{S:8}
  trap 'rm -vf %{options}' ERR
  exec 1>&6-

  # Read the options file
  . %{options}

  # Clean texmf tree
  rm -rf %{buildroot}

  # Place texmf tree into the build root
  mkdir -p %{buildroot}%{_texmf_doc}
  mkdir -p %{buildroot}%{_texmf_dist}
  mkdir -p %{buildroot}%{_texmf_main}

  mkdir -p %{_builddir}/texlive
  ln -sf   %{buildroot}%{_texmf_doc}  %{_builddir}/texlive/texmf-dist
  ln -sf   %{buildroot}%{_texmf_dist} %{_builddir}/texlive/texmf-dist
  ln -sf   %{buildroot}%{_texmf_main} %{_builddir}/texlive/texmf

  tar --use-compress-program=xz -xpsS --strip-components=1 --no-overwrite-dir --dereference --keep-old-files -f %{S:1} -C %{_builddir}/texlive

%setup -c -q -n texlive -T

  tar --use-compress-program=xz --strip-components=1 -xf %{S:0}

  ln -sf   %{buildroot}%{_texmf_doc}  %{_builddir}/texlive/texmf-doc
  ln -sf   %{buildroot}%{_texmf_dist} %{_builddir}/texlive/texmf-dist
  ln -sf   %{buildroot}%{_texmf_main} %{_builddir}/texlive/texmf

  rm -vf   %{buildroot}%{_texmf_doc}/texmf
  rm -vf   %{buildroot}%{_texmf_dist}/texmf
  rm -vf   %{buildroot}%{_texmf_main}/texmf

%patch1  -p0 -b .configure
%patch2  -p0 -b .xdvizilla
%patch3  -p0 -b .arraysubs
%patch5  -p0 -b .texdoc
%patch6  -p0 -b .dviutils
%if %{with psutils}
%patch7  -p0 -b .psutils-flip
%patch8  -p0 -b .psutils
%endif
%patch10 -p0 -b .poppler
%patch11 -p0 -b .lacheck
%patch12 -p0 -b .warns
%patch13 -p0 -b .x11r7
%patch17 -p0 -b .64
%patch19 -p0 -b .dvipng
%patch40 -p0
%patch41 -p0
%patch42 -p0
%patch43 -p1
%patch44 -p0
%patch45 -p0
%patch46 -p0
%patch0  -p0

  # Move texmf tree out of the way
  rm -rf %{_tmppath}/%{name}-%{version}-backup
  mv -v  %{buildroot} %{_tmppath}/%{name}-%{version}-backup

%build

  # Move texmf tree back
  rm -rf %{buildroot}
  mv -v %{_tmppath}/%{name}-%{version}-backup %{buildroot}

  # Read the options file
  . %{options}

  # Sanity check for system icu libraries and headers
  # Remark: official libicu is _not_ compatible with libicu of XeTeX
  if test -s /usr/include/layout/GlyphPositioningTables.h -a \
	  -s /usr/include/layout/Features.h -a \
	  -s /usr/include/common/cmemory.h \
	&& false
  then
	icu[0]='--with-system-icu'
	icu[1]='--with-icu-include=/usr/include/unicode -I/usr/include/layout -I/usr/include/common'
  else
	icu[0]=""
  fi

  # We have an other autoconf/automake version
  ./reautoconf libs/icu/dummy

  # Run configure now
  # longinteger and off_t declarations are still inconsistent, do not
  # enable largefile unless you are testing.
  # Default to building ICU without thread support, since xetex does
  # not need it.
  ./configure				\
	--host=${HOST}			\
	--build=${BUILD}		\
	--disable-native-texlive-build	\
	--disable-cxx-runtime-hack	\
	--cache-file=$PWD/config.cache	\
	--disable-multiplatform		\
	--prefix=%{_prefix}		\
	--datadir=%{_datadir}		\
	--exec-prefix=%{_texmf_dist} 	\
	--bindir=%{_texbindir}/$BINARY	\
	--libdir=%{_libdir}		\
	--infodir=%{_texinfodir}	\
	--mandir=%{_texmandir}		\
	--sysconfdir=%{_sysconfdir}	\
	--localstatedir=%{_varlib}	\
	--sharedstatedir=%{_varlib}	\
	--includedir=%{_includedir}	\
	--x-libraries=%{_x11lib}	\
	--x-includes=%{_x11inc}		\
	--disable-cxx-runtime-hack	\
	--enable-freetype		\
	--disable-texinfo		\
	--disable-texi2html		\
	--disable-dialog		\
	--disable-t1utils		\
	--disable-lcdf-typetools	\
	--disable-ttf2pk		\
	--disable-dvi2tty		\
	--disable-xindy			\
	--disable-vlna			\
	--disable-xz			\
	--disable-largefile		\
	--disable-threads		\
	--%{!?with_psutils:disable}%{?with_psutils:enable}-psutils \
	--enable-musixflx		\
	--enable-lacheck		\
	--enable-detex			\
	--enable-seetexk		\
	--enable-tex4htk		\
	--with-gnu-libc			\
	--with-system-xz		\
	--with-system-dialog		\
	--with-system-t1utils		\
	--with-system-ncurses		\
	--with-system-zlib		\
	--with-system-expat		\
	--with-system-unzip		\
	--with-system-xpdf		\
	--with-system-libpng		\
	--with-system-pnglib		\
	--with-system-t1lib		\
	--with-system-gd		\
	--with-system-freetype		\
	--with-system-zziplib		\
	--with-freetype-include=/usr/include/freetype	\
	--with-system-freetype2		\
	--with-freetype2-include=/usr/include/freetype2	\
	--with-tex-banner="TeX Live %version/${VENDOR}" \
	${icu[0]:+"${icu[@]}"}		\
	--enable-epsfwin			\
	--enable-mftalkwin		\
	--enable-regiswin			\
	--enable-tektronixwin		\
	--enable-unitermwin		\
	--with-ps=gs			\
	--with-x			\
	--with-mf-x-toolkit		\
	--with-xdvi-x-toolkit=xaw3d	\
	--with-editor='vi +%%d %%s'

  # Make the global configuration file and make a backup
  make -C texk/kpathsea/ texmf.cnf
  cp -p texk/kpathsea/texmf.cnf texmf.tmp

  # Just make a configuration file for the build root environment
  mkdir -p %{buildroot}%{_texcnfdir}/web2c
  sed -r '\@^[A-Z]+[[:space:]]*=[[:space:]]*@ { s@(=[[:space:]]*|[:;])(/)@\1${ROOT}\2@g; }' \
	< texmf.tmp > %{buildroot}%{_texcnfdir}/web2c/texmf.cnf

  # Make build happy by using the texmf.cnf from build root environment
  TEXMFCNF=%{buildroot}%{_texcnfdir}/web2c//
  export TEXMFCNF
  ROOT=%{buildroot}
  export ROOT
  KPATHSEA_WARNING=0
  export KPATHSEA_WARNING

  # Just make the binaries
  make

  # build nobody
  gcc ${RPM_OPT_FLAGS} -o nobody %{S:50}

%install

  # Read the options file
  . %{options}

  # Not required anymore
  rm -f %{options}

  # Some initial directories, permissions, and files
  mkdir -p %{buildroot}%{_texscrdir}
  mkdir -p %{buildroot}%{_texbindir}/$BINARY
  mkdir -p %{buildroot}%{_texcnfdir}/dvips/config
  mkdir -p %{buildroot}%{_fontcache}/pk
  mkdir -p %{buildroot}%{_fontcache}/source
  mkdir -p %{buildroot}%{_fontcache}/tfm
  mkdir -p %{buildroot}%{_texvardir}/dist
  mkdir -p %{buildroot}%{_texvardir}/main
  mkdir -p %{buildroot}%{_texvardir}/web2c
  mkdir -p %{buildroot}%{_texvardir}/fonts
  mkdir -p %{buildroot}%{_texvardir}/fonts/dvipdfm
  mkdir -p %{buildroot}%{_texvardir}/fonts/dvips
  mkdir -p %{buildroot}%{_texvardir}/fonts/pdftex
  mkdir -p %{buildroot}%{_sysconfdir}/cron.daily
  mkdir -p %{buildroot}%{_sysconfdir}/permissions.d
  mkdir -p %{buildroot}%{_sysconfdir}/profile.d
  mkdir -p %{buildroot}%{_sysconfdir}/fonts/conf.avail
  mkdir -p %{buildroot}%{_sysconfdir}/fonts/conf.d
  mkdir -p %{buildroot}/sbin/conf.d
  mkdir -p %{buildroot}%{_appdefdir}
  mkdir -p %{buildroot}%{_x11bin}
  mkdir -p %{buildroot}%{_bindir}
  mkdir -p %{buildroot}%{_includedir}
  mkdir -p %{buildroot}%{_sbindir}
  mkdir -p %{buildroot}%{_defaultdocdir}/texlive-nfs
  mkdir -p %{buildroot}%{_defaultdocdir}
  mkdir -p %{buildroot}%{_mandir}/man1
  mkdir -p %{buildroot}%{_mandir}/man5
  mkdir -p %{buildroot}%{_mandir}/man8
  mkdir -p %{buildroot}%{_infodir}
  mkdir -p %{buildroot}%{_libdir}
  mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
  mkdir -p %{buildroot}%{_sysconfdir}/skel

  # Set write permission for root
  chmod -R u+rw,go-w,go+r,a-s %{buildroot}/

  # Enviroment
  install -m 0644 %{S:13} %{buildroot}%{_sysconfdir}/profile.d/
  install -m 0644 %{S:14} %{buildroot}%{_sysconfdir}/profile.d/
  install -m 0644 %{S:15} %{buildroot}%{_sysconfdir}/fonts/conf.avail/09-texlive.conf
  install -m 0644 %{S:16} %{buildroot}%{_sysconfdir}/fonts/conf.avail/09-texlive-type1.conf
  ln -sf ../conf.avail/09-texlive.conf \
			  %{buildroot}%{_sysconfdir}/fonts/conf.d/
  install -m 0644 %{S:31} %{buildroot}%{_sysconfdir}/skel/.dvipsrc

  # Sticky bit for temporary user files
  chmod  1755  %{buildroot}%{_texvardir}
  chmod  1755  %{buildroot}%{_texvardir}/dist
  chmod  1755  %{buildroot}%{_texvardir}/main
  chmod  1755  %{buildroot}%{_texvardir}/fonts
  chmod  1755  %{buildroot}%{_texvardir}/fonts/dvipdfm
  chmod  1755  %{buildroot}%{_texvardir}/fonts/dvips
  chmod  1755  %{buildroot}%{_texvardir}/fonts/pdftex
  chmod  1755  %{buildroot}%{_texcache}
  chmod  1777  %{buildroot}%{_fontcache}
  chmod  1777  %{buildroot}%{_fontcache}/pk
  chmod  1777  %{buildroot}%{_fontcache}/source
  chmod  1777  %{buildroot}%{_fontcache}/tfm

  # The main ls-R file
  > %{buildroot}%{_texvardir}/dist/ls-R
  > %{buildroot}%{_texvardir}/main/ls-R
  chmod 0666 %{buildroot}%{_texvardir}/dist/ls-R
  chmod 0666 %{buildroot}%{_texvardir}/main/ls-R
  rellink %{buildroot}%{_texvardir}/dist/ls-R %{buildroot}%{_texmf_dist}/ls-R
  rellink %{buildroot}%{_texvardir}/main/ls-R %{buildroot}%{_texmf_main}/ls-R
  echo '% ls-R -- filename database for kpathsea; do not change this line.' > \
      %{buildroot}%{_texvardir}/dist/ls-R
  echo '% ls-R -- filename database for kpathsea; do not change this line.' > \
      %{buildroot}%{_texvardir}/main/ls-R
  pushd %{buildroot}%{_texmf_dist}/
      ls -RLA ./ >> %{buildroot}%{_texvardir}/dist/ls-R
  popd
  pushd %{buildroot}%{_texmf_main}/
      ls -RLA ./ >> %{buildroot}%{_texvardir}/main/ls-R
  popd

  # Install config stuff
  install -m 0644 %{S:10} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.texlive
  install -m 0755 %{S:11} %{buildroot}/sbin/conf.d/SuSEconfig.texlive
  install -m 0755 %{S:12} %{buildroot}%{_sysconfdir}/cron.daily/suse-texlive

  # Install dviutils stuff
  for script in a4toa5 odd2even mydvichk; do
      script=texk/seetexk/$script
      test -e $script || continue
      install -m 0755 $script %{buildroot}%{_texscrdir}/
  done

%if %{with psutils}
  # Install psutils stuff
  mkdir -p %{buildroot}%{_texmf_doc}/doc/psutils
  install -m 0644 utils/psutils/README  %{buildroot}%{_texmf_doc}/doc/psutils/
  install -m 0644 utils/psutils/LICENSE %{buildroot}%{_texmf_doc}/doc/psutils/
%endif

  # Install NFS import stuff
  install -m 0755 %{S:20} %{buildroot}/usr/sbin/texlive-import
  install -m 0644 %{S:21} %{buildroot}%{_mandir}/man8/texlive-import.8
  install -m 0644 %{S:22} %{buildroot}%{_defaultdocdir}/texlive-nfs/README
  gzip -9f %{buildroot}%{_mandir}/man8/texlive-import.8

  # Documentation at default
  for pkg in texlive texlive-doc texlive-cjk texlive-arab texlive-metapost	\
	     texlive-context texlive-omega texlive-xetex texlive-latex		\
	     texlive-latex-doc texlive-tools texlive-tex4ht texlive-ppower4	\
	     texlive-xmltex texlive-jadetex texlive-musictex
  do
      base=${pkg#*-}
      mkdir -p %{buildroot}%{_defaultdocdir}/$pkg
      if test -d %{buildroot}%{_texmf_doc}/doc/$base ; then
	  relpath=$(relpath %{_texmf_doc}/doc/$base %{_defaultdocdir}/$pkg)
      else
	  relpath=$(relpath %{_texmf_doc}/doc %{_defaultdocdir}/$pkg)
      fi
      rm -f  %{buildroot}%{_defaultdocdir}/$pkg/doc
      ln -sf $relpath %{buildroot}%{_defaultdocdir}/$pkg/doc
  done

  # Set the environment without ROOT within formats
  TEXMFCNF=%{buildroot}%{_texcnfdir}/web2c//
  export TEXMFCNF
  ROOT=%{buildroot}
  export ROOT
  KPATHSEA_WARNING=0
  export KPATHSEA_WARNING

  # Install into build root
  make install DESTDIR=%{buildroot}	\
	prefix=%{_prefix}		\
	datadir=%{_datadir}		\
	exec_prefix=%{_prefix}	\
	bindir=%{_texbindir}/$BINARY	\
	libdir=%{_libdir}		\
	infodir=%{_texinfodir}		\
	mandir=%{_texmandir}		\
	sysconfdir=%{_sysconfdir}	\
	localstatedir=%{_varlib}	\
	sharedstatedir=%{_varlib}	\
	includedir=%{_includedir}	\
	texmf=%{_texmf_dist}		\
	texmfmain=%{_texmf_main}	\
	vartexfonts=%{_fontcache}

  # install nobody
  install -m 0755 nobody  %{buildroot}%{_texbindir}/$BINARY/nobody
  install -m 0644 %{S:51} %{buildroot}%{_texmandir}/man1/nobody.8

  # !!! No foreign update system as this will break RPM !!!
  find %{buildroot}%{_texmf_dist}/ \
       %{buildroot}%{_texmf_main}/ -name 'tlmgr*' | xargs -r rm -vrf

  # Clean out not wanted file
  rm -vf  %{buildroot}%{_libdir}/*.la
  rm -vrf %{buildroot}%{_texmf_dist}/source
  rm -vrf %{buildroot}%{_texmf_dist}/lists
  rm -vrf %{buildroot}%{_texmf_dist}/tpm
  rm -vrf %{buildroot}%{_texmf_dist}/latex/cwpuzzle
  rm -vrf %{buildroot}%{_texmf_main}/source
  rm -vrf %{buildroot}%{_texmf_main}/lists
  rm -vrf %{buildroot}%{_texmf_main}/tpm
  rm -vrf %{buildroot}%{_texmf_main}/ttf2pk
  rm -vrf %{buildroot}%{_texmf_main}/fonts/enc/ttf2pk
  rm -vrf %{buildroot}%{_texmf_main}/fonts/map/ttf2pk
  rm -vf  %{buildroot}%{_texmf_main}/tex/generic/config/preload.cfg
  rm -vf  %{buildroot}%{_texmf_doc}/doc/texdraw/*.[ch]
  rm -vf  %{buildroot}%{_texmf_doc}/doc/texdraw/*.{cps,fns,texi}
  rm -vf  %{buildroot}%{_texmf_doc}/doc/texdraw/texi2dvi
  rm -vrf %{buildroot}%{_texmf_doc}/doc/atex/eskdx/source
  find %{buildroot}%{_texmf_doc}/doc/ -name '*.in' | \
      while read line ; do
	  test -e ${line%%.in} || continue
	  rm -vf ${line}
      done
  for dup in makeinfo texinfo texi2dvi texi2html texi2roff texi2pdf \
	     texindex infokey info info-stnd install-info dvi2tty pdftexi2dvi \
%if %{without psutils}
	     epsffit extractres fixdlsrps fixfmps fixmacps fixpsditps \
	     fixpspps fixscribeps fixtpps fixwfwps fixwpps fixwwps \
	     getafm includeres psbook psmerge psnup psresize psselect \
	     pstops showchar \
%endif
	     t1ascii t1asm t1binary t1disasm t1dotlessj t1lint t1mac \
	     t1reencode t1testpage t1unmac \
	     ttf2afm ttf2pk ttf2pt1 ttf2tfm ttfdump ttftotype42 \
	     otftotfm otfinfo cfftot1 mmafm mmpfb
  do
      if test -e %{buildroot}%{_texbindir}/$BINARY/${dup} ; then
	  continue
      fi
      if test -e %{buildroot}%{_texscrdir}/${dup} ; then
	  continue
      fi
      rm -vf %{buildroot}%{_texmf_main}/{,doc/}info/${dup}.info*
      rm -vf %{buildroot}%{_texmf_main}/{,doc/}man/man1/${dup}.1*
      rm -vf %{buildroot}%{_texmf_main}/{,doc/}man/man5/${dup}.5*
  done
  rm -vf  %{buildroot}%{_texmandir}/man1/Makefile
  rm -vf  %{buildroot}%{_texmandir}/man5/Makefile
  rm -vf  %{buildroot}%{_texmf_dist}/scripts/jmlr/makejmlrbook.bat
  rm -vrf %{buildroot}%{_texmf_doc}/doc/texi2html
  rm -vrf %{buildroot}%{_texmf_doc}/doc/texinfo
  if test -e %{buildroot}%{_texmf_dist}/fonts/map/dvips/cm-super/cm-super-t1.map ; then
      find %{buildroot}%{_texmf_dist}/fonts/map/ -name 'cm-super-*.map' | \
	  while read line ; do
	      cmdir=${line%%/*}
	      cmpkg=${cmdir##*/}
	      if test "$cmpkg" != "cm-super" ; then
		  cmnew=${cmdir%%/*}/cm-super
		  test -d ${cmnew} || mkdir -p ${cmnew}
		  mv -v $line ${cmnew}/
	      fi
	  done
  else
      find %{buildroot}%{_texmf_dist}/fonts/map/ -name 'cm-super-*.map' | xargs -r rm -vf
  fi
  for scr in %{buildroot}%{_texmf_dist}/fonts/source/public/tipa/*.sh \
	     %{buildroot}%{_texmf_dist}/fonts/source/public/wsuipa/compilefonts \
	     %{buildroot}%{_texmf_dist}/dvips/dvipsconfig/addpsctrl \
	     %{buildroot}%{_texmf_dist}/metapost/mp3d/create_animation.sh \
	     %{buildroot}%{_texmf_dist}/tex/plain/cyrplain/makefmts.sh \
	     %{buildroot}%{_texmf_dist}/tex/generic/t2/cyrfinst/etc/showenc \
	     %{buildroot}%{_texmf_dist}/tex/fontinst/cyrfinst/etc/showenc \
	     %{buildroot}%{_texmf_dist}/scripts/context/stubs/unix/* \
	     %{buildroot}%{_texmf_dist}/scripts/context/ruby/*.rb \
	     %{buildroot}%{_texmf_dist}/scripts/context/ruby/*/*.rb \
	     %{buildroot}%{_texmf_dist}/scripts/context/ruby/*/*/*.rb \
	     %{buildroot}%{_texmf_main}/tex/generic/hyphen/bahyph.sh \
	     %{buildroot}%{_texmf_dist}/scripts/context/lua/*.lua \
	     %{buildroot}%{_texmf_dist}/scripts/shipunov/*.sh \
	     %{buildroot}%{_texmf_dist}/scripts/shipunov/*.pl \
	     %{buildroot}%{_texmf_main}/scripts/texlive/lua/texlive/*.tlu \
	     %{buildroot}%{_texmf_main}/scripts/tetex/*.pl \
	     %{buildroot}%{_texmf_main}/scripts/texlive/*.pl
  do
      test -e $scr || continue
      case "$(file -be ascii $scr)" in
      *script\ text*|*executable*)
	  chmod 0755 $scr
      esac
  done
  for txt in %{buildroot}%{_texmf_dist}/scripts/xetex/perl/lib/PDF/Reuse.pm \
	     %{buildroot}%{_texmf_dist}/bibtex/bst/iopart-num/iopart-num.bst \
	     %{buildroot}%{_texmf_dist}/tex/latex/gastex/gastex.sty \
	     %{buildroot}%{_texmf_dist}/tex/latex/svgcolor/svgcolor.sty \
	     %{buildroot}%{_texmf_dist}/dvips/gastex/gastex.pro \
	     %{buildroot}%{_texmf_dist}/tex/context/third/account/t-floatnumber.mkii \
	     %{buildroot}%{_texmf_dist}/tex/context/third/account/t-floatnumber.mkiv \
	     %{buildroot}%{_texmf_dist}/tex/context/third/account/t-floatnumber.tex \
	     %{buildroot}%{_texmf_dist}/tex/context/third/account/t-account.mkii \
	     %{buildroot}%{_texmf_dist}/tex/context/third/account/t-account.mkiv \
	     %{buildroot}%{_texmf_dist}/tex/context/interface/third/t-resume.xml
  do
      test -e $txt || continue
      chmod 0644 $txt
  done
  for scr in %{buildroot}%{_texmf_dist}/scripts/oberdiek/pdfatfi.pl \
	     %{buildroot}%{_texmf_dist}/scripts/pst2pdf/pst2pdf.pl \
	     %{buildroot}%{_texmf_dist}/scripts/epspdf/epspdfrc.rb \
	     %{buildroot}%{_texmf_main}/scripts/ps2eps/ps2eps.pl \
	     %{buildroot}%{_texmf_dist}/scripts/vpe/vpe.pl \
	     %{buildroot}%{_texmf_dist}/scripts/epstopdf/epstopdf.pl \
	     %{buildroot}%{_texmf_dist}/scripts/lua-alt-getopt/alt_getopt.lua \
	     %{buildroot}%{_texmf_dist}/scripts/pdfcrop/pdfcrop.pl \
	     %{buildroot}%{_texmf_dist}/scripts/pst2pdf/pst2pdf \
	     %{buildroot}%{_texmf_dist}/scripts/pkfix/pkfix.pl \
	     %{buildroot}%{_texmf_dist}/scripts/thumbpdf/thumbpdf.pl \
	     %{buildroot}%{_texmf_dist}/scripts/context/perl/mptopdf.pl \
	     %{buildroot}%{_texbindir}/$BINARY/vpe \
	     %{buildroot}%{_texbindir}/$BINARY/thumbpdf	\
	     %{buildroot}%{_texbindir}/$BINARY/pkfix	\
	     %{buildroot}%{_texbindir}/$BINARY/pdfcrop	\
	     %{buildroot}%{_texbindir}/$BINARY/epstopdf
  do
      test -e $scr || continue
      read line < $scr
      case "$line" in
      eval*perl*)
	  set -o noglob
	  ed ${scr} <<-EOF
		1
		i
		#! /usr/bin/perl
		.
		w
		q
		EOF
	  set +o noglob
	  continue
      esac
      case "${scr##*/}" in
      *.rb)
	  set -o noglob
	  ed ${scr} <<-EOF
		1
		i
		#! /usr/bin/ruby
		.
		w
		q
		EOF
	  set +o noglob
	  ;;
      *.lua)
	  set -o noglob
	  ed ${scr} <<-EOF
		1
		i
		#! /usr/bin/env texlua
		.
		w
		q
		EOF
	  set +o noglob
      esac
  done

  # Clean up info and manual pages
  rm -vf     %{buildroot}%{_texinfodir}/localdir
  ln -sf dir %{buildroot}%{_texinfodir}/localdir
  for f in dvilj2p dvilj4 dvilj4l dvilj6; do
      f=%{buildroot}%{_texmandir}/man1/${f}.1
      test -L $f && continue
      rm -vf $f
      ln -sf dvilj.1 $f
  done
  ln -sf tangle.1 %{buildroot}%{_texmandir}/man1/otangle.1
  ln -sf mf.1     %{buildroot}%{_texmandir}/man1/mfw.1
  ln -sf pdftex.1 %{buildroot}%{_texmandir}/man1/pdfeinitex.1
  ln -sf pdftex.1 %{buildroot}%{_texmandir}/man1/pdfelatex.1
  ln -sf pdftex.1 %{buildroot}%{_texmandir}/man1/pdfevirtex.1
  ln -sf detex.1  %{buildroot}%{_texmandir}/man1/delatex.1
  for page in musixflx.1 ; do
      page=$(find %{buildroot}%{_texmf_dist}/ -name $page)
      test -n "$page" -a -e "$page" || continue
      mv "$page" %{buildroot}%{_texmandir}/man1/
  done

  # Repair MusixTeX/MusicTeX examples
  musictex=$(find %{buildroot}%{_texmf_doc}/doc/ -name musictex -a -type d)
  musixtex=$(find %{buildroot}%{_texmf_doc}/doc/ -name musixtex -a -type d)
  if test -d "$musictex" -a -d "${musixtex}/examples" ; then
      relpath=$(relpath $musictex ${musixtex}/examples)
      for f in choral.tex reves.tex aria.tex magnific.tex ; do
	  test -e ${musictex}/$f || continue
	  ln -sf $relpath/${f##*/} ${musixtex}/examples/
      done
      touch ${musixtex}/examples/recueil.toc
  fi
  musixref=$(find %{buildroot}%{_texmf_dist}/tex/ -name musixref.tex)
  if test -n "$musixref" -a -e "$musixref" ; then
      mv -v "$musixref" ${musixtex}/
  fi
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/musictex/musictex.ins
  musicref=$(find %{buildroot}%{_texmf_dist}/tex/ -name musicref.tex)
  if test -n "$musicref" -a -e "$musicref" ; then
      mv -v "$musicref" ${musictex}/
  fi
  musicdoc=$(find %{buildroot}%{_texmf_dist}/tex/ -name musicdoc.tex)
  if test -n "$musicdoc" -a -e "$musicdoc" ; then
      mv -v "$musicdoc" ${musictex}/
  fi

  # Move some other files
  bangfont=$(find %{buildroot}%{_texmf_doc}/doc/ -name bangfont.tex)
  if test -n "$bangfont" -a -d %{buildroot}%{_texmf_dist}/tex/latex/bangfont/ ; then
      mv -v $bangfont %{buildroot}%{_texmf_dist}/tex/latex/bangfont/
  fi
  otibet=$(find %{buildroot}%{_texmf_doc}/doc/ -name otibet.tex)
  if test -n "$otibet" -a -d %{buildroot}%{_texmf_dist}/tex/latex/otibet/ ; then
      mv -v $otibet %{buildroot}%{_texmf_dist}/tex/latex/otibet/
  fi

  # Remove pdftosrc manual apge if not supported, add pdfetex link
  if ! test -x %{buildroot}%{_texbindir}/$BINARY/pdftosrc ; then
      rm -vf %{buildroot}%{_texmandir}/man1/pdftosrc.1
  fi
  if ! test -x %{buildroot}%{_texbindir}/$BINARY/pdfetex ; then
      ln -sf pdftex %{buildroot}%{_texbindir}/$BINARY/pdfetex
  fi

  # Enable LaTeX mode of detex
  if ! test -x %{buildroot}%{_texbindir}/$BINARY/delatex ; then
      ln -sf detex  %{buildroot}%{_texbindir}/$BINARY/delatex
  fi

  # Remove windows files
  rm -rf %{buildroot}%{_texmf_dist}/scripts/context/stubs/mswin
  rm -rf %{buildroot}%{_texmf_dist}/tex4ht/base/win32
  rm -vf %{buildroot}%{_texmf_dist}/tex/plain/gustlib/plmac218/{plind.bat,przyklad.tex}
  rm -vf %{buildroot}%{_texmf_dist}/tex/plain/cyrplain/makefmts.bat
  rm -vf %{buildroot}%{_texmf_dist}/scripts/pst-pdf/ps4pdf.bat
  rm -vf %{buildroot}%{_texmf_dist}/scripts/shipunov/biokey2html.bat
  rm -vf %{buildroot}%{_texmf_dist}/scripts/glossaries/makeglossaries.bat
  find   %{buildroot}%{_texmf_dist}/fonts -name '*.bat' -o -name '*.job' | xargs -r rm -vf
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/t2/etc/rubibtex/rubibtex.{bat,sed}
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/pst-pdf/scripts/ps4pdf.bat*
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/glossary/makeglos.bat
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/t2/etc/rumkidx/rumkidx*.{sed,bat}
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/ppower4/ppower4.bat
  ppower4=$(find %{buildroot}%{_texmf_dist}/scripts/ -name ppower4 -a -type f)
  if test -n "$ppower4" -a -e "$ppower4" ; then
      chmod 755 "$ppower4"
      rellink "$ppower4" %{buildroot}%{_texmf_doc}/doc/latex/ppower4/ppower4.bat
  fi
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/musictex/*.bat
  musicdoc=$(find %{buildroot}%{_texmf_doc}/doc/ -name musicdoc.sh -a -type f)
  if test -n "$musicdoc" -a -e "$musicdoc" ; then
      chmod 755 "$musicdoc"
  fi
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/musixtex/*.bat
  musixdoc=$(find %{buildroot}%{_texmf_doc}/doc/ -name musixdoc.sh -a -type f)
  if test -n "$musixdoc" -a -e "$musixdoc" ; then
      chmod 755 "$musixdoc"
  fi
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/sugconf/*.bat
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/newlfm/*.bat
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/thesis-titlepage-fhac/*.bat
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/isodate/install.bat
  rm -vf %{buildroot}%{_texmf_doc}/doc/generic/tex-ps/cmyk-hax/sam1-sep.bat
  find   %{buildroot}%{_texmf_doc}/doc/latex/gatech-thesis/julesverne/ -name '*.bat' | xargs -r rm -vf
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/splitindex/splitindex-*
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/splitindex/splitindex.exe
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/bibarts/gbib*.bat
  rm -vf %{buildroot}%{_texmf_doc}/doc/latex/bibarts/gbibsort.exe

  # Configurations files which should be moved to /etc/texmf/
  for cfg in mexconf.tex cyrtex.cfg cont-usr.tex language.def	\
	     amsppt.sti pdftexconfig.tex language.dat texmf.cnf	\
	     mktex.cnf fmtutil.cnf context.cnf updmap.cfg XDvi	\
	     config.ps config dvipdfmx.cfg
  do
      for olddir in $(find %{buildroot}%{_texmf}/ -name $cfg -a -type f -printf '%%h\n') ; do
	  olddir=${olddir#%{buildroot}}
	  sysdir=%{_texcnfdir}/${olddir#*texmf/}
	  case "$olddir" in
	  */texmf/doc/*) continue
	  esac
	  if test $cfg = dvipdfmx.cfg -a $olddir = %{_texmf_main}/dvipdfm ; then
	      mv -vf %{buildroot}${olddir}/${cfg} %{buildroot}${olddir}/config/${cfg}
	      olddir=${olddir}/config
	  fi
	  test -d %{buildroot}${sysdir} || mkdir -p %{buildroot}${sysdir}
	  if test -e %{buildroot}${sysdir}/${cfg} ; then
	      rm -vf %{buildroot}${olddir}/${cfg}
	  else
	      mv -vf %{buildroot}${olddir}/${cfg} %{buildroot}${sysdir}/
	  fi
	  rellink    %{buildroot}${sysdir}/${cfg} %{buildroot}${olddir}/${cfg}
      done
  done

  rm -vf  %{buildroot}%{_appdefdir}/XDvi
  rellink %{buildroot}%{_texcnfdir}/xdvi/XDvi %{buildroot}%{_appdefdir}/XDvi
%if "%_x11bin" != "%_bindir"
  rm -vf  %{buildroot}%{_x11bin}/xdvi
  rellink %{buildroot}%{_bindir}/xdvi %{buildroot}%{_x11bin}/xdvi
%endif

  # Move scripts to noarch, symbolic links first
  for f in %{buildroot}%{_texbindir}/$BINARY/* ; do
      test -e $f || continue
      case "$(file -b $f)" in
      *symbolic\ link*)
	  t=$(readlink -f $f)
	  case "$(file -b $t)" in
	  *script\ text*)
	      mv -v $f %{buildroot}%{_texscrdir}/
	  esac
      esac
  done
  for f in %{buildroot}%{_texbindir}/$BINARY/* ; do
      if test ! -e $f ; then
	  t=$(readlink $f)
	  if test -e %{buildroot}%{_texscrdir}/$t ; then
	      mv -v $f %{buildroot}%{_texscrdir}/
	  fi
	  continue
      fi
      case "$(file -b $f)" in
      *script\ text*)
	  mv -v $f %{buildroot}%{_texscrdir}/
      esac
  done

  # Remove doubled scripts from binary bindir
  target=""
  fdupes -qsr %{buildroot}%{_texbindir}/$BINARY/ %{buildroot}%{_texscrdir}/ | \
      while read file; do
	  if test -z "$target" ; then
	      target="$file"
	  else
	      if test -z "$file" ; then
		  target=""
		  continue
	      fi
	      test -s "$target"  || continue
	      case "$target" in
	      */noarch/*)   rm -vf $file    ;;
	      *)	    rm -vf $target  ;;
	      esac
	  fi
      done
  find %{buildroot}%{_texbindir}/$BINARY/ -type d -a -empty | xargs -r rm -vr
  rm -vrf %{buildroot}%{_texbindir}/$BINARY/glossaries
  rm -vrf %{buildroot}%{_texbindir}/$BINARY/oberdiek

  # Move shared/dist web2c files back to lib/main web2c
  relpath=$(relpath %{_texmf_main}/web2c %{_texmf_dist}/web2c)
  for f in %{buildroot}%{_texmf_dist}/web2c/* ; do
      test -e $f || continue
      test -L $f && continue
      g=%{buildroot}%{_texmf_main}/web2c/${f##*/}
      test -e $g || continue
      mv -v $f $g
      ln -sf $relpath/${f##*/} $f
  done

  # Move shared/dist texconfig files back to lib/main texconfig
  relpath=$(relpath %{_texmf_main}/texconfig %{_texmf_dist}/texconfig)
  for f in %{buildroot}%{_texmf_dist}/texconfig/* ; do
      test -e $f || continue
      test -L $f && continue
      g=%{buildroot}%{_texmf_main}/texconfig/${f##*/}
      test -e $g || continue
      mv -v $f $g
      ln -sf $relpath/${f##*/} $f
  done

  # Avoid build root string in format
  ROOT=/tmp/=
  TEXMFCNF=${ROOT}%{_texcnfdir}/web2c//
  ln -sf %{buildroot} ${ROOT}
  export ROOT TEXMFCNF

  # Do some intial configurations
  OPATH=${PATH}
  PATH=%{buildroot}%{_texbindir}/$BINARY:%{buildroot}%{_texscrdir}:${PATH}
  export PATH

  texconfig-sys rehash
  texconfig-sys paper a4
  texconfig-sys dvipdfm paper a4
  texconfig-sys pdftex paper a4
  texconfig-sys mode ljfour
  texconfig-sys xdvi paper a4
  texconfig-sys dvips mode ljfour
  texconfig-sys dvips paper a4
  texconfig-sys dvips printcmd -
  for oldpr in %{buildroot}%{_texmf}/dvips/config/config.* ; do
      test -e $oldpr || continue
      oldpr=${oldpr#%{buildroot}}
      syspr=%{_texcnfdir}/${oldpr#*texmf/}
      if test -e %{buildroot}${syspr} ; then
	  rm -vf %{buildroot}${oldpr}
      else
	  mv -vf %{buildroot}${oldpr} %{buildroot}${syspr}
      fi
      rellink    %{buildroot}${syspr} %{buildroot}${oldpr}
  done
  for pr in bjc600 stcolor deskjet ljet4 ; do
      pr=config.${pr}
      test ! -e %{buildroot}%{_texcnfdir}/dvips/config/$pr || continue
      texconfig-sys dvips add ${pr#*.}
  done
  texconfig-sys rehash
  texconfig-sys dvips -P bjc600  mode canonbjc
  texconfig-sys dvips -P stcolor mode epstylus
  texconfig-sys dvips -P deskjet mode deskjet
  texconfig-sys dvips -P ljet4   mode ljfour
  texconfig-sys rehash

  updmap-sys --syncwithtrees
  texconfig-sys rehash

  texconfig-sys init
  texconfig-sys font rw
  texconfig-sys rehash

  pushd utils/vlna/
%if %suse_version > 1120
      autoreconf
%endif
      ./configure				\
	  --host=${HOST}			\
	  --build=${BUILD}			\
	  --cache-file=$PWD/config.cache	\
	  --prefix=%{_prefix}			\
	  --datadir=%{_datadir}			\
	  --exec-prefix=%{_texmf_dist} 		\
	  --bindir=%{_texbindir}/$BINARY	\
	  --libdir=%{_libdir}			\
	  --infodir=%{_texinfodir}		\
	  --mandir=%{_texmandir}		\
	  --sysconfdir=%{_sysconfdir}		\
	  --localstatedir=%{_varlib}		\
	  --sharedstatedir=%{_varlib}		\
	  --includedir=%{_includedir}		\
	  --x-libraries=%{_x11lib}		\
	  --x-includes=%{_x11inc}
      make
      rm -vf %{buildroot}%{_texmandir}/man1/vlna.1*
      make install DESTDIR=%{buildroot}		\
	  prefix=%{_prefix}			\
	  datadir=%{_datadir}			\
	  exec_prefix=%{_prefix}		\
	  bindir=%{_texbindir}/$BINARY		\
	  libdir=%{_libdir}			\
	  infodir=%{_texinfodir}		\
	  mandir=%{_texmandir}			\
	  sysconfdir=%{_sysconfdir}		\
	  localstatedir=%{_varlib}		\
	  sharedstatedir=%{_varlib}		\
	  includedir=%{_includedir}		\
	  texmf=%{_texmf_dist}			\
	  texmfmain=%{_texmf_main}		\
	  vartexfonts=%{_fontcache}
      gzip -9f %{buildroot}%{_texmandir}/man1/vlna.1
  popd
  pushd utils/asymptote
      autoreconf
      TEXMFLOCAL=/usr/lib/texmf			\
      ./configure				\
	  --host=${HOST}			\
	  --build=${BUILD}			\
	  --cache-file=$PWD/config.cache	\
	  --prefix=%{_prefix}			\
	  --datadir=%{_texmf_main}		\
	  --exec-prefix=%{_texmf_main}		\
	  --bindir=%{_texbindir}/$BINARY	\
	  --libdir=%{_libdir}			\
	  --infodir=%{_texinfodir}		\
	  --mandir=%{_texmandir}		\
	  --sysconfdir=%{_sysconfdir}		\
	  --localstatedir=%{_varlib}		\
	  --sharedstatedir=%{_varlib}		\
	  --includedir=%{_includedir}		\
	  --x-libraries=%{_x11lib}		\
	  --x-includes=%{_x11inc}		\
	  --disable-texlive-build		\
	  --enable-readline			\
	  --enable-gsl				\
	  --enable-fftw				\
	  --enable-gl
      make
      rm -vf %{buildroot}%{_texmandir}/man1/asy.1*
      rm -vf %{buildroot}%{_texmandir}/man1/xasy.1*
      make install DESTDIR=%{buildroot}
      lnk=$(readlink %{buildroot}/%{_texbindir}/$BINARY/xasy)
      rm -vf %{buildroot}/%{_texbindir}/$BINARY/xasy
      rellink %{buildroot}$lnk %{buildroot}/%{_texscrdir}/xasy
      chmod 0755 %{buildroot}%{_texmf_main}/asymptote/asy-kate.sh
  popd

  PATH=${OPATH}
  unset TEXMFCNF OPATH

  # Move scripts to noarch, symbolic links first
  for f in %{buildroot}%{_texbindir}/$BINARY/* ; do
      test -e $f || continue
      case "$(file -b $f)" in
      *symbolic\ link*)
	  t=$(readlink -f $f)
	  case "$(file -b $t)" in
	  *script\ text*)
	      mv -v $f %{buildroot}%{_texscrdir}/
	  esac
      esac
  done
  for f in %{buildroot}%{_texbindir}/$BINARY/* ; do
      if test ! -e $f ; then
	  t=$(readlink $f)
	  if test -e %{buildroot}%{_texscrdir}/$t ; then
	      mv -v $f %{buildroot}%{_texscrdir}/
	  fi
	  continue
      fi
      case "$(file -b $f)" in
      *script\ text*)
	  mv -v $f %{buildroot}%{_texscrdir}/
      esac
  done

  # Relink programs after initialization to catch new links
  relpath=$(relpath %{_texbindir}/$BINARY %{_bindir})
  for f in %{buildroot}%{_texbindir}/$BINARY/* ; do
      test -e $f || continue
      f=${f##*/}
      rm -vf %{buildroot}%{_bindir}/$f
      ln -sf $relpath/$f %{buildroot}%{_bindir}/$f
  done
  relpath=$(relpath %{_texscrdir}/ %{_bindir})
  for f in %{buildroot}%{_texscrdir}/* ; do
      test -e $f || continue
      f=${f##*/}
      rm -vf %{buildroot}%{_bindir}/$f
      ln -sf $relpath/$f %{buildroot}%{_bindir}/$f
  done

  # Relink manual pages and info files
  relpath=$(relpath %{_texinfodir} %{_infodir})
  for f in %{buildroot}%{_texinfodir}/*info* ; do
      test -e $f || continue
      if test -L $f ; then
	  l=$(readlink $f)
	  rm -vf $f
	  if test ${f} = ${f%%.gz} ; then
	      ln -sf ${l}.gz ${f}.gz
	      f=${f}.gz
	  else
	      ln -sf ${l} ${f}
	  fi
      else
	  if test ${f} = ${f%%.gz} ; then
	      gzip -9f $f
	      f=${f}.gz
	  fi
      fi
      f=${f##*/}
      rm -vf %{buildroot}%{_infodir}/$f
      ln -sf $relpath/$f %{buildroot}%{_infodir}/$f
  done
  for mansec in 1 5 ; do
      relpath=$(relpath %{_texmandir}/man$mansec %{_mandir}/man$mansec)
      for f in %{buildroot}%{_texmandir}/man$mansec/*.* ; do
	  if test -L $f ; then
	      l=$(readlink $f)
	      rm -vf $f
	      if test ${f} = ${f%%.gz} ; then
		  ln -sf ${l}.gz ${f}.gz
		  f=${f}.gz
	      else
		  ln -sf ${l} ${f}
	      fi
	  else
	      test -e $f || continue
	      if test ${f} = ${f%%.gz} ; then
		  gzip -9f $f
		  f=${f}.gz
	      fi
	  fi
	  f=${f##*/}
	  rm -vf %{buildroot}%{_mandir}/man$mansec/$f
	  ln -sf $relpath/$f %{buildroot}%{_mandir}/man$mansec/$f
      done
  done
  unset relpath

  # Clean out not wanted file
  if test -n "%{buildroot}" -a -d "%{buildroot}" ; then
      find %{buildroot}/ -name '*.orig' -o -name '*.log' -o -name '*.aux' \
	  -o -name '*.ilg' -o -name '.cvsignore' -o -name '*.bak' -o -name '*.mx[1-9]'
  else
      find %{_texcnfdir}/ %{_texvardir}/ %{_texmf_doc}/ %{_texmf_dist}/ %{_texmf_main}/ \
	  -name '*.orig' -o -name '*.log' -o -name '*.aux' \
	  -o -name '*.ilg' -o -name '.cvsignore' -o -name '*.bak' -o -name '*.mx[1-9]'
  fi | xargs -r rm -vf

  # Clean out the maps and formats
  if test -n "$ROOT" -a -d "$ROOT" ; then
      SLASH=$(echo "$ROOT" | tr '[[:print:]]' '/')
      for match in $(grep -rl $ROOT ${ROOT}) ; do
	  mv -v $match ${match}.tmp
	  case "$match" in
	  *.map)
	      sed "s@$ROOT@@g" < ${match}.tmp > $match
	      ;;
	  *.fmt|*.base)
	      sed "s@$ROOT@$SLASH@g" < ${match}.tmp > $match
	      ;;
	  *)
	      echo $match 1>&2
	      exit 1
	  esac
	  rm -v ${match}.tmp
      done
      unset match SLASH
  fi
  rm -vf ${ROOT}
  unset ROOT

  # Clean out some file duplicates within the *same* sub package
  # but *never* for font maps or any other type of configuration
  for dir in %{buildroot}%{_texmf_doc}/doc/*		\
	     %{buildroot}%{_texmf_dist}/tex4ht		\
	     %{buildroot}%{_texmf_dist}/tex/*
  do
      test -d "$dir" || continue
      target=""
      fdupes -qr ${dir}/ | while read file; do
	  if test -z "$target" ; then
	      target="$file"
	  else
	      if test -z "$file" ; then
		  target=""
		  continue
	      fi
	      test -s "$target"  || continue
	      case "$target" in
	      config.*|*.cfg|*.cnf) continue ;;
	      *.def|*.ini|*.ins)    continue ;;
	      */cmk*|*.enc|*.map)   continue ;;
	      *.eps|*.pdf|*.ps)              ;;
	      *)  test "${target%%/*}" = "${file%%/*}" || continue
	      esac
	      ln -f "$target" "$file"
	  fi
      done
  done

  # Last but not least install backup texmf configuration file
  cp -p texmf.tmp %{buildroot}%{_texcnfdir}/web2c/texmf.cnf

  # The permission files, any change is also required within do.mklists
  (cat > %{buildroot}/etc/permissions.d/texlive) <<-EOF
	%{_texvardir}/ls-R		root:root		0666
	%{_texvardir}/dist/ls-R		root:root		0666
	%{_texvardir}/main/ls-R		root:root		0666
	%{_fontcache}/ls-R		root:root		0666
	%{_texvardir}/			root:root		1755
	%{_texvardir}/dist/		root:root		1755
	%{_texvardir}/main/		root:root		1755
	%{_texvardir}/fonts/		root:root		1755
	%{_texvardir}/fonts/dvipdfm/	root:root		1755
	%{_texvardir}/fonts/dvips/	root:root		1755
	%{_texvardir}/fonts/pdftex/	root:root		1755
	%{_texcache}/			root:root		1755
	%{_fontcache}/			root:root		1777
	%{_fontcache}/pk/		root:root		1777
	%{_fontcache}/source/		root:root		1777
	%{_fontcache}/tfm/		root:root		1777
	EOF
  (cat > %{buildroot}/etc/permissions.d/texlive.paranoid) <<-EOF
	%{_texvardir}/ls-R		root:root		0644
	%{_texvardir}/dist/ls-R		root:root		0644
	%{_texvardir}/main/ls-R		root:root		0644
	%{_fontcache}/ls-R		root:root		0644
	%{_texvardir}/			root:root		1755
	%{_texvardir}/dist/		root:root		1755
	%{_texvardir}/main/		root:root		1755
	%{_texvardir}/fonts/		root:root		1755
	%{_texvardir}/fonts/dvipdfm/	root:root		1755
	%{_texvardir}/fonts/dvips/	root:root		1755
	%{_texvardir}/fonts/pdftex/	root:root		1755
	%{_texcache}/			root:root		1755
	%{_fontcache}/			root:root		1755
	%{_fontcache}/pk/		root:root		1755
	%{_fontcache}/source/		root:root		1755
	%{_fontcache}/tfm/		root:root		1755
	EOF
  while read path rest ; do
      echo $path
  done < %{buildroot}/etc/permissions.d/texlive > %{buildroot}/%{_texcnfdir}/permlist

  # Create the main file list
  TMPDIR=${PWD}/lists
  PATH=%{_sourcedir}:$PATH
  export TMPDIR PATH

  bash %{S:6} -b texlive -c

  # Split off the specific file lists
  set -o noglob
  (cat | bash %{S:6} -b texlive)<<-EOF
	#
	# Import of TeXLive with NFS
	#
	nfs		packages/texlive-nfs
	nfs		/texlive-import
	#
	# Tools useful for (La)TeX, PostScript and DVI
	#
	tools		packages/texlive-tools
	tools		/psutils/
	tools		/fix(dlsrps|fmps|macps|psditps|pspps|scribeps|tpps|wfwps|wpps|wwps)(\\*|\\.1\\.gz)?\$
	tools		/ps(book|merge|nup|resize|select|tops)(\\*|\\.1\\.gz)?\$
	tools		/(epsffit|extractres|getafm|includeres|showchar)(\\*|\\.1\\.gz)?\$
	tools		/dviutils/
	tools		/dvi(book|concat|select|todvi)(\\*|\\.1\\.gz)?\$
	tools		/(a4toa5|mydvichk|odd2even)(\\*|\\.1\\.gz)?\$
	tools		/lacheck/
	tools		/lacheck(\\*|\\.1\\.gz)?\$
	tools		/detex/
	tools		/de(la)?tex(\\*|\\.1\\.gz)?\$
	#
	# TeX4ht
	#
	tex4ht		packages/texlive-tex4ht
	tex4ht		/t(ex)?4ht
	tex4ht		/ht(|context|latex|mex|tex|texi|xe(la)?tex)(\\.1\\.gz)?\$
	tex4ht		/mk4ht
	#
	# PPower4
	#
	ppower4		packages/texlive-ppower4
	ppower4		/ppower4
	#
	# XmlTeX
	#
	xmltex		packages/texlive-xmltex
	xmltex		/(pdf)?xmltex
	xmltex		/passivetex/
	xmltex		/format\\.xmltex\\.cnf
	#
	# JadeTeX
	#
	jadetex		packages/texlive-jadetex
	jadetex		/(pdf)?jadetex
	jadetex		/format\\.jadetex\\.cnf
	#
	# MusixTeX/MusicTex
	#
	musictex	packages/texlive-musictex
	musictex	/(pdf)?musi[cx]tex
	musictex	/musixflx
	musictex	/musixps
	musictex	/format\\.musi[cx]tex\\.cnf
	#
	# Headers, kpathsea lib and (C)WEB tools
	#
	devel		packages/texlive-devel
	devel		/include/kpathsea/
	devel		/include/ptexenc/
	devel		/%{_lib}/libkpathsea\\.(l?a|so(\.[\.0-9]+)?)\\*?\$
	devel		/%{_lib}/libptexenc\\.(l?a|so(\.[\.0-9]+)?)\\*?\$
	devel		/([co]?tangle|c?tie|c?weave)\\*?\$
	devel		/([co]?tangle|c?tie|c?weave|cweb)\\.1\\.gz\$
	#
	# CJK support
	#
	cjk		packages/texlive-cjk
	cjk		/latex/CJK/
	cjk		/(cns|arphic|garuda|norasi|uhc|wadalab)/
	cjk		/(chinese|c90enc|yi4latex|hbf2gf)
	cjk		/(language\\.py\\.dat|pyhyph\\.tex)
	cjk		/man1/(bg5|cef5|cef|cefs|ext|sjis)conv\\.1\\.gz\$
	cjk		/man1/hbf2gf\\.1\\.gz\$
	cjk		/(bg5\\+?|cef[5s]?|ext|sjis)conv(/|\\*?\$)
	cjk		/(bg5\\+?|cef[5s]?|ext|sjis|gbk|sjis)(pdf)?latex\\*?\$
	cjk		/unic-cjk\\.tex
	#
	# Arab and Hebrew support
	#
	arab		packages/texlive-arab
	arab		/arab(i|tex)/
	arab		/language\\.(ar|fa)\\.dat
	arab		/cjhebrew/
	#
	# Metapost
	#
	metapost	packages/texlive-metapost
	metapost	/(metapost|mfpic|emp|expressg|exteps|featpost)/
	metapost	/(dvitomp|dmp|mpost|mpto(pdf)?|makempx|newer)\\*?\$
	metapost	/(dvitomp|dmp|mpost|mpto(pdf)?|makempx|newer)\\.1\\.gz\$
	metapost	/(metafun|mpost|mp)\\.(base|mem|pool|ini)\$
	metapost	/config/(mfmp|mpost)\\.ini
	metapost	/(meta(font|post)|latex)/(feynmf|metaobj|metaplot)/
	metapost	/metafont/roex/
	metapost	/latex/(slideshow|textpath)/
	metapost	/format\\.metapost\\.cnf
	#
	# Extra fonts
	#
	$(sed -r 's@^/(.*)/$@fonts-extra-doc\t/doc/(.*/)?\1/@'	< %{S:40})
	$(sed -r 's@^/(.*)/$@fonts-extra\t/\1/@'		< %{S:40})
	#
	# ConteXt
	#
	context		packages/texlive-context
	context		/context/third/asymptote
	context		/bin(|/noarch)/(context|mtxrun|pdfthumb|pdftrimwhite|texfind|texshow)\$
	context		/(context|jmh)/
	context		/(ctx|exa|lua|mps|mtx|pdf|rlx|run|tex|tmf|xml)tools\\*?\$
	context		/(makempy|(mp|ps)topdf|tex(exec|font|mfstart|util))\\*?\$
	context		/(ctx|exa|lua|mps|mtx|pdf|rlx|run|tex|tmf|xml)tools\\.1\\.gz\$
	context		/(makempy|(mp|ps)topdf|tex(exec|font|mfstart|util))\\.1\\.gz\$
	context		/config/cont-[^/]*\\.ini\$
	context		/web2c/pdftex/cont-[^/]*\\.(fmt|base|pool|mem)\$
	context		/web2c/context\\.cnf
	context		/format\\.context\\.cnf
	#
	# Omega
	#
	omega		packages/texlive-omega
	omega		/(omega|lambda|mxd|mxedruli|omegahyph|ofm|ovf|ovp)/
	omega		/(aleph|lambda|lamed|omega)\\*?\$
	omega		/(aleph|lambda|lamed|omega)\\.(ini|oft|fmt|base|pool|mem)\$
	omega		/(aleph|lambda|lamed|omega)\\.1\\.gz\$
	omega		/(odvi(copy|ps|type)|oxdvi)\\*?\$
	omega		/o(fm2opl|mfonts|pl2ofm|tp2ocp|utocp|vf2ovp|vp2ovf)\\*?\$
	omega		/(odvi(copy|ps|type)|oxdvi)\\.1\\.gz\$
	omega		/o(fm2opl|mfonts|pl2ofm|tp2ocp|utocp|vf2ovp|vp2ovf)\\.1\\.gz\$
	omega		/encodings/[^/]*\\.onm
	omega		/format\\.(aleph|omega)\\.cnf
	#
	# XeTeX
	#
	base		/ifxetex\\.sty
	xetex		packages/texlive-xetex
	xetex		/(xelatex|ifxetex|xetex|xetexconfig)/
	xetex		/(xdvipdfmx|xelatex|xetex)\\*?\$
	xetex		/(xdvipdfmx|xelatex|xetex)\\.1\\.gz\$
	xetex		/(xdvipdfmx|xelatex|xetex)\\.(ini|fmt|base|pool|mem)\$
	xetex		/web2c/xetex/cont-[^/]*\\.(fmt|base|pool|mem)\$
	xetex		/format\\.xetex\\.cnf
	xetex		/fonts/conf\\.(avail|d)/
	#
	# The old dvi printer drivers
	#
	dvilj		/dvi(hp|lj(|2p|4|4l|6))\\*?\$
	dvilj		/dvi(hp|lj(|2p|4|4l|6))\\.1\\.gz\$
	dvilj		/dvilj/
	#
	# LaTeX
	#
	latex		packages/texlive-latex
	latex		/latex/asymptote
	latex		/(pdf(e|p|a|cs|lua)?|ps?|ht|ml|a|cs|lua)?latex3?\\.(1|info)\\.gz\$
	latex		/(asy-faq|asymptote)\\.info\\.gz\$
	latex		/x?asy\\.1x?\\.gz\$
	latex		/((ru)?bibtex8?|mkindex|(ru)?makeindex)\\.1\\.gz\$
	latex-doc	packages/texlive-latex-doc
	latex-doc	/doc/(a|cs|lua)?latex3?
	latex-doc	/doc/[^/]+/[^/]*(lua)?latex
	latex-doc	/doc/.*/latex(2e|209)/
	latex-doc	/doc/(.*/)?tlc2
	latex-doc	/doc/(.*/)?kopka
	latex-doc	/doc/(.*/)?lshort(-.*)?
	latex-doc	/doc/(.*/)?beamer(-.*)?
	latex-doc	/doc/(.*/)?((ru)?bibtex8?|mkindex|(ru)?makeindex)
	latex-doc	/doc/asymptote
	latex		/(pdf(e|p|a|cs|lua)?|ps?|ht|ml|a|cs|lua)?latex3?/
	latex		/(pdf(e|p|a|cs|lua)?|ps?|ht|ml|a|cs|lua)?latex3?\\*?\$
	latex		/x?asy\\*?\$
	latex		/asymptote
	latex		/format\\.(pdf(e|p|a|cs|lua)?|ps?|ht|ml|a|cs|lua)?latex3?\\.cnf
	latex		/((ru)?bibtex8?|rumkidx|(ru)?makeindex|lmextra)/
	latex		/((ru)?bibtex8?|mkindex|(ru)?makeindex)\\*?\$
	latex		/latex3?/amsfonts/
	latex		/(pdf(e|p|a|cs|lua)?|ps?|ht|ml|a|cs|lua)?latex\\.(pool|e?fmt|ini)?\$
	latex		/format\\.latex\\.cnf
	#
	# Basics
	#
	base		/doc/(man|info)/
	doc		/doc/
	base		.
	EOF
  set +o noglob

  # Finalize the generated file lists
  bash %{S:6} -b texlive -f

  # Generate the file lists for the binary packages
  bash %{S:6} -b texlive -a

%pre  -n texlive
for x in web2c dvips/config pdvips/config pdftex/config xdvi	\
	 tex/generic/config tex/context/config etex/plain/config
do
    if test -L usr/share/texmf/$x ; then
	rm  -f usr/share/texmf/$x
    fi
    if test -L usr/lib/texmf/$x ; then
	rm  -f usr/lib/texmf/$x
    fi
done
for x in var/lib/texmf/web2c/mktex* var/lib/texmf/web2c/*.log	\
	 var/lib/texmf/web2c/*.tcx  var/lib/texmf/web2c/*.cnf	\
	 var/lib/texmf/web2c/*.pool etc/texmf/language.dat*	\
	 var/lib/texmf/tex/generic/config/*.cfg
do
    if test -e $x ; then
	rm  -f $x
    fi
done
for x in g v x
do
    x=usr/share/texmf/texconfig/$x
    if test -d $x -a ! -L $x ; then
	rm -rf $x
    fi
done

%posthash
%install_info --info-dir=.%{_infodir} .%{_infodir}/dvipng.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/dvips.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/eplain.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/fontname.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/kpathsea.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/tds.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/texdraw.info.gz
%install_info --info-dir=.%{_infodir} .%{_infodir}/web2c.info.gz
%fillup_only
%run_permissions

%posthash doc


%posthash devel


%posthash cjk


%posthash arab


%posthash metapost


%posthash fonts-extra


%posthash fonts-extra-doc


%posthash context


%posthash omega


%posthash xetex


%posthash latex


%install_info --info-dir=.%{_infodir} .%{_infodir}/latex.info.gz

%posthash latex-doc


%posthash tools


%posthash tex4ht


%posthash ppower4


%posthash xmltex


%posthash jadetex


%posthash musictex


%postunhash
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/dvipng.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/dvips.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/eplain.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/fontname.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/kpathsea.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/tds.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/texdraw.info.gz
%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/web2c.info.gz

%postunhash doc


%postunhash devel


%postunhash cjk


%postunhash arab


%postunhash metapost


%postunhash fonts-extra


%postunhash fonts-extra-doc


%postunhash context


%postunhash omega


%postunhash xetex


%postunhash latex


%install_info_delete --info-dir=.%{_infodir} .%{_infodir}/latex.info.gz

%postunhash latex-doc


%postunhash tools


%postunhash tex4ht


%postunhash ppower4


%postunhash xmltex


%postunhash jadetex


%postunhash musictex


%verifyscript -n texlive
%verify_permissions -f %{_texcnfdir}/permlist

%if 0%{?opensuse_bs}

%clean
%{?buildroot: %{__rm} -rf %{buildroot}}
du -schx %{_rpmdir} %{_srcrpmdir}
cat /proc/swaps
%endif

%files -n texlive               -f lists/texlive-base

%files -n texlive-doc           -f lists/texlive-doc

%files -n texlive-bin           -f lists/texlive-bin-base

%files -n texlive-devel         -f lists/texlive-devel

%files -n texlive-bin-devel     -f lists/texlive-bin-devel

%files -n texlive-cjk           -f lists/texlive-cjk

%files -n texlive-bin-cjk       -f lists/texlive-bin-cjk

%files -n texlive-arab          -f lists/texlive-arab

%files -n texlive-metapost      -f lists/texlive-metapost

%files -n texlive-bin-metapost  -f lists/texlive-bin-metapost

%files -n texlive-fonts-extra   -f lists/texlive-fonts-extra

%files -n texlive-fonts-extra-doc -f lists/texlive-fonts-extra-doc

%files -n texlive-context       -f lists/texlive-context

%files -n texlive-omega         -f lists/texlive-omega

%files -n texlive-bin-omega     -f lists/texlive-bin-omega

%files -n texlive-xetex         -f lists/texlive-xetex

%files -n texlive-bin-xetex     -f lists/texlive-bin-xetex

%files -n texlive-dvilj         -f lists/texlive-dvilj

%files -n texlive-bin-dvilj     -f lists/texlive-bin-dvilj

%files -n texlive-latex         -f lists/texlive-latex

%files -n texlive-latex-doc     -f lists/texlive-latex-doc

%files -n texlive-bin-latex     -f lists/texlive-bin-latex

%files -n texlive-tools         -f lists/texlive-tools

%files -n texlive-bin-tools     -f lists/texlive-bin-tools

%files -n texlive-tex4ht        -f lists/texlive-tex4ht

%files -n texlive-bin-tex4ht    -f lists/texlive-bin-tex4ht

%files -n texlive-ppower4       -f lists/texlive-ppower4

%files -n texlive-xmltex        -f lists/texlive-xmltex

%files -n texlive-bin-xmltex    -f lists/texlive-bin-xmltex

%files -n texlive-jadetex       -f lists/texlive-jadetex

%files -n texlive-bin-jadetex   -f lists/texlive-bin-jadetex

%files -n texlive-musictex      -f lists/texlive-musictex

%files -n texlive-bin-musictex  -f lists/texlive-bin-musictex

%files -n texlive-nfs           -f lists/texlive-nfs

%changelog
openSUSE Build Service is sponsored by