123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- ##
- ## tetex.spec -- Portable RPM Specification
- ## Copyright (c) 2000-2001 Cable & Wireless ECRC GmbH
- ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- %define V_base 1.0
- %define V_src 1.0.7
- %define V_texmf 1.0.2
- %define with_x11 no
- # package information
- Name: tetex
- Summary: The TeX Typesetting System
- URL: http://www.tug.org/teTeX/
- Vendor: Thomas Esser et al.
- Packager: The OpenPKG Project
- Distribution: OpenPKG [REL]
- Group: Text
- License: GPL
- Version: %{V_src}
- Release: 20011201
- # list of sources
- Source0: ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/1.0/distrib/sources/teTeX-src-%{V_src}.tar.gz
- Source1: ftp://sunsite.informatik.rwth-aachen.de/pub/comp/tex/teTeX/1.0/distrib/sources/teTeX-texmf-%{V_texmf}.tar.gz
- Source2: http://users.ox.ac.uk/~rahtz/passivetex/passivetex.zip
- Source3: ftp://ftp.tex.ac.uk/tex-archive/macros/xmltex/base.zip
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20011126.0, make, gzip, infozip, flex, bison
- PreReq: OpenPKG, openpkg >= 20011126.0
- AutoReq: no
- AutoReqProv: no
- %description
- teTeX is a complete TeX distribution for Unix compatible systems,
- maintained by Thomas Esser. It is based on Karl Berry's original
- Web2c distribution. TeX was invented by Donald E. Knuth, and the
- most popular TeX macro set (LaTeX) for TeX was invented by Leslie
- Lamport. The OpenPKG teTeX package also contains David Carlisle'
- xmltex (namespace-aware XML parser written in TeX) and Sebastian
- Rahtz' PassiveTeX (XML-FO rendering engine).
- %prep
- %setup -q -n teTeX-%{V_base}
- # teTeX requires the texmf stuff to be already in place
- # for building and installing the source parts.
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/share/texmf
- %{l_gzip} -d -c %{SOURCE teTeX-texmf-%{V_texmf}.tar.gz} |\
- (umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf -)
- # add XMLTeX (XML parsing via TeX)
- ( cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex
- %{l_prefix}/bin/unzip -x %{SOURCE base.zip}
- mv base xmltex
- )
- ( echo ""
- echo "# XMLTeX (XML parsing via TeX) [does not work as expected here]"
- echo "# xmltex latex language.dat xmltex.ini"
- echo "# pdfxmltex pdflatex language.dat pdfxmltex.ini"
- echo ""
- ) >>texk/web2c/fmtutil.in
- ( echo ""
- echo "% XMLTeX (XML parsing via TeX)"
- echo "main_memory.xmltex = 2500000"
- echo "main_memory.pdfxmltex = 2500000"
- echo "param_size.xmltex = 1500"
- echo "param_size.pdfxmltex = 1500"
- echo "stack_size.xmltex = 1500"
- echo "stack_size.pdfxmltex = 1500"
- echo "hash_extra.xmltex = 50000"
- echo "hash_extra.pdfxmltex = 50000"
- echo "string_vacancies.xmltex = 45000"
- echo "string_vacancies.pdfxmltex = 45000"
- echo "pool_free.xmltex = 47500"
- echo "pool_free.pdfxmltex = 47500"
- echo "nest_size.xmltex = 500"
- echo "nest_size.pdfxmltex = 500"
- echo "save_size.xmltex = 10000"
- echo "save_size.pdfxmltex = 10000"
- echo "pool_size.xmltex = 500000"
- echo "pool_size.pdfxmltex = 500000"
- echo "max_strings.xmltex = 55000"
- echo "max_strings.pdfxmltex = 55000"
- echo "buf_size.xmltex = 200000"
- echo "buf_size.pdfxmltex = 200000"
- echo ""
- ) >>texk/kpathsea/texmf.in
- # add PassiveTeX (XML-FO to DVI/PDF translation via TeX)
- ( %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
- cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
- %{l_prefix}/bin/unzip -x %{SOURCE passivetex.zip}
- rm -f ChangeLog Makefile README.passivetex send
- rm -rf test
- )
- # minor fixes to the teTeX sources
- %{l_rpmtool} subst "s;\|O_SYNC;;g" -- libs/libwww/HTMemLog.c
- %build
- # we cannot use %{l_make}, because teTeX dislikes absolute
- # paths for make. Instead we work-around via $PATH.
- PATH="%{l_prefix}/bin:$PATH"; export PATH
- # configure the system by using the (wrong) paths to the temporary
- # installation area, followed by by a step for fixing the paths
- # (to the correct values) inside the kpathsea library (which
- # performs the run-time searches). This way we get all the magic
- # of the teTeX build system without problems, but still make sure
- # that the built-in paths are correct.
- %{l_rpmtool} subst -s -v \
- 's;^vartexfonts =.*;vartexfonts = %{l_prefix}/var/tetex/fonts;' \
- -- texk/make/paths.mk
- CC="%{l_cc}" \
- CXX="%{l_cxx}" \
- CFLAGS="%{l_cflags -O}" \
- CXXFLAGS="%{l_cflags -O}" \
- ./configure \
- --prefix=$RPM_BUILD_ROOT%{l_prefix} \
- --datadir=$RPM_BUILD_ROOT%{l_prefix}/share \
- %if "%{with_x11}" == "no"
- --without-xdvik \
- --without-oxdvik \
- --without-x \
- --without-x11 \
- --without-x11win \
- %endif
- --disable-multiplatform \
- --enable-gf
- ( cd texk/kpathsea
- %{l_rpmtool} subst -v \
- "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \
- -- `find . -type f -print`
- make %{l_mflags} all
- )
- # build the sources
- make %{l_mflags} all
- %install
- # again same $PATH trick as above.
- PATH="%{l_prefix}/bin:$PATH"; export PATH
- # perform the standard installation procdure of teTeX
- make %{l_mflags} install
- # perform manual steps for installing XMLTeX
- ( TEXMFMAIN="$RPM_BUILD_ROOT%{l_prefix}/share/texmf"
- export TEXMFMAIN
- PATH="$RPM_BUILD_ROOT%{l_prefix}/bin:$PATH"
- cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/web2c
- $RPM_BUILD_ROOT%{l_prefix}/bin/tex -ini "&latex" xmltex.ini
- $RPM_BUILD_ROOT%{l_prefix}/bin/pdftex -ini "&pdflatex" pdfxmltex.ini
- $RPM_BUILD_ROOT%{l_prefix}/bin/mktexlsr
- ( cd $RPM_BUILD_ROOT%{l_prefix}/bin
- ln -s tex xmltex
- ln -s pdftex pdfxmltex
- )
- )
- # create dynamically generated font directory
- %{l_shtool} mkdir -f -p -m 777 \
- $RPM_BUILD_ROOT%{l_prefix}/var/tetex/fonts
- # adjust paths in manual pages
- %{l_rpmtool} subst -s -v \
- "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};g" \
- -- $RPM_BUILD_ROOT%{l_prefix}/man/man1/*.1
- # cleanup the installation
- rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|