1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tetex/tetex.spec Fri Aug 10 14:12:46 2012 +0200 1.3 @@ -0,0 +1,230 @@ 1.4 +## 1.5 +## tetex.spec -- OpenPKG RPM Package Specification 1.6 +## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> 1.7 +## 1.8 +## Permission to use, copy, modify, and distribute this software for 1.9 +## any purpose with or without fee is hereby granted, provided that 1.10 +## the above copyright notice and this permission notice appear in all 1.11 +## copies. 1.12 +## 1.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.24 +## SUCH DAMAGE. 1.25 +## 1.26 + 1.27 +# package versions 1.28 +%define V_base 3.0 1.29 +%define V_src 3.0 1.30 +%define V_texmf 3.0 1.31 +%define V_xmltex 20020625 1.32 +%define V_passivetex 20031022 1.33 + 1.34 +# package information 1.35 +Name: tetex 1.36 +Summary: The TeX Typesetting System 1.37 +URL: http://tug.org/teTeX/ 1.38 +Vendor: Thomas Esser et al. 1.39 +Packager: OpenPKG Foundation e.V. 1.40 +Distribution: OpenPKG Community 1.41 +Class: BASE 1.42 +Group: Typesetting 1.43 +License: GPL 1.44 +Version: %{V_src} 1.45 +Release: 20120623 1.46 + 1.47 +# list of sources 1.48 +Source0: ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-src-%{V_src}.tar.gz 1.49 +Source1: ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-texmf-%{V_texmf}.tar.gz 1.50 +Source2: http://download.openpkg.org/components/versioned/tetex/passivetex-%{V_passivetex}.zip 1.51 +Source3: http://download.openpkg.org/components/versioned/tetex/base-%{V_xmltex}.zip 1.52 +Patch0: tetex.patch 1.53 + 1.54 +# build information 1.55 +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, infozip, flex, bison 1.56 +PreReq: OpenPKG, openpkg >= 20100101, perl 1.57 +BuildPreReq: png, zlib 1.58 +PreReq: png, zlib 1.59 + 1.60 +%description 1.61 + teTeX is a complete TeX distribution for Unix compatible systems, 1.62 + maintained by Thomas Esser. It is based on Karl Berry's original 1.63 + Web2c distribution. TeX was invented by Donald E. Knuth, and the 1.64 + most popular TeX macro set (LaTeX) for TeX was invented by Leslie 1.65 + Lamport. The OpenPKG teTeX package also contains David Carlisle' 1.66 + xmltex (namespace-aware XML parser written in TeX) and Sebastian 1.67 + Rahtz' PassiveTeX (XSL-FO rendering engine). 1.68 + 1.69 +%track 1.70 + prog tetex:tetex-src = { 1.71 + version = %{V_src} 1.72 + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/ 1.73 + regex = ((\d+\.)+\d+) 1.74 + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/ 1.75 + regex = tetex-src-(__VER__)\.tar\.gz 1.76 + } 1.77 + prog tetex:tetex-texmf = { 1.78 + version = %{V_texmf} 1.79 + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/ 1.80 + regex = ((\d+\.)+\d+) 1.81 + url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/ 1.82 + regex = tetex-texmf-(__VER__)\.tar\.gz 1.83 + } 1.84 + 1.85 +%prep 1.86 + %setup -q -n tetex-src-%{V_src} 1.87 + %patch -p0 1.88 + 1.89 + # teTeX requires the texmf stuff to be already in place 1.90 + # for building and installing the source parts. 1.91 + %{l_shtool} mkdir -f -p -m 755 \ 1.92 + $RPM_BUILD_ROOT%{l_prefix}/share/texmf 1.93 + %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\ 1.94 + ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $? 1.95 + 1.96 + # add XMLTeX (XML parsing via TeX) 1.97 + ( cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex 1.98 + %{l_prefix}/bin/unzip -q -x %{SOURCE base-%{V_xmltex}.zip} 1.99 + mv base xmltex 1.100 + ) || exit $? 1.101 + ( echo "" 1.102 + echo "# XMLTeX (XML parsing via TeX) [does not work as expected here]" 1.103 + echo "xmltex latex language.dat xmltex.ini" 1.104 + echo "pdfxmltex pdflatex language.dat pdfxmltex.ini" 1.105 + echo "" 1.106 + ) >>texk/web2c/fmtutil.in 1.107 + ( echo "" 1.108 + echo "% XMLTeX (XML parsing via TeX)" 1.109 + echo "main_memory.xmltex = 2500000" 1.110 + echo "main_memory.pdfxmltex = 2500000" 1.111 + echo "param_size.xmltex = 1500" 1.112 + echo "param_size.pdfxmltex = 1500" 1.113 + echo "stack_size.xmltex = 1500" 1.114 + echo "stack_size.pdfxmltex = 1500" 1.115 + echo "hash_extra.xmltex = 50000" 1.116 + echo "hash_extra.pdfxmltex = 50000" 1.117 + echo "string_vacancies.xmltex = 45000" 1.118 + echo "string_vacancies.pdfxmltex = 45000" 1.119 + echo "pool_free.xmltex = 47500" 1.120 + echo "pool_free.pdfxmltex = 47500" 1.121 + echo "nest_size.xmltex = 500" 1.122 + echo "nest_size.pdfxmltex = 500" 1.123 + echo "save_size.xmltex = 10000" 1.124 + echo "save_size.pdfxmltex = 10000" 1.125 + echo "pool_size.xmltex = 500000" 1.126 + echo "pool_size.pdfxmltex = 500000" 1.127 + echo "max_strings.xmltex = 55000" 1.128 + echo "max_strings.pdfxmltex = 55000" 1.129 + echo "buf_size.xmltex = 200000" 1.130 + echo "buf_size.pdfxmltex = 200000" 1.131 + echo "" 1.132 + ) >>texk/kpathsea/texmf.in 1.133 + 1.134 + # add PassiveTeX (XSL-FO to DVI/PDF translation via TeX) 1.135 + ( %{l_shtool} mkdir -f -p -m 755 \ 1.136 + $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex 1.137 + cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex 1.138 + %{l_prefix}/bin/unzip -q -x %{SOURCE passivetex-%{V_passivetex}.zip} 1.139 + rm -f ChangeLog Makefile README.passivetex send 1.140 + rm -rf test 1.141 + ) || exit $? 1.142 + 1.143 + # minor fixes to the teTeX sources 1.144 + %{l_shtool} subst \ 1.145 + -e '1s;/usr/bin/perl;/usr/bin/env perl;' \ 1.146 + texk/*/t1mapper 1.147 + %{l_shtool} subst \ 1.148 + -e "s;\(\$(scriptdir)/fmtutil-sys --all\);\1 --fmtdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/web2c;" \ 1.149 + -e "s,\(\$(scriptdir)/updmap-sys\);,\1 --dvipsoutputdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/map/dvips/updmap --pdftexoutputdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/map/dvips/updmap --dvipdfmoutputdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/fonts/map/dvips/updmap;," \ 1.150 + Makefile.in 1.151 + 1.152 +%build 1.153 + # configure the system by using the (wrong) paths to the temporary 1.154 + # installation area, followed by by a step for fixing the paths 1.155 + # (to the correct values) inside the kpathsea library (which 1.156 + # performs the run-time searches). This way we get all the magic 1.157 + # of the teTeX build system without problems, but still make sure 1.158 + # that the built-in paths are correct. 1.159 + %{l_shtool} subst -s -v \ 1.160 + -e 's;^vartexfonts =.*;vartexfonts = %{l_prefix}/var/tetex/fonts;' \ 1.161 + texk/make/paths.mk 1.162 + CC="%{l_cc}" \ 1.163 + CXX="%{l_cxx}" \ 1.164 + CFLAGS="%{l_cflags -O}" \ 1.165 + CXXFLAGS="%{l_cxxflags -O}" \ 1.166 + CPPFLAGS="%{l_cppflags}" \ 1.167 + LEX="%{l_prefix}/bin/flex" \ 1.168 + ./configure \ 1.169 + --prefix=$RPM_BUILD_ROOT%{l_prefix} \ 1.170 + --datadir=$RPM_BUILD_ROOT%{l_prefix}/share \ 1.171 + --without-xdvik \ 1.172 + --without-oxdvik \ 1.173 + --without-x \ 1.174 + --without-x11 \ 1.175 + --without-x11win \ 1.176 + --without-texinfo \ 1.177 + --disable-multiplatform \ 1.178 + --enable-gf \ 1.179 + --with-system-pnglib \ 1.180 + --with-pnglib-libdir=%{l_prefix}/lib \ 1.181 + --with-pnglib-include=%{l_prefix}/include \ 1.182 + --with-system-zlib \ 1.183 + --with-zlib-libdir=%{l_prefix}/lib \ 1.184 + --with-zlib-include=%{l_prefix}/include 1.185 + ( cd texk/kpathsea 1.186 + %{l_shtool} subst -v \ 1.187 + -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \ 1.188 + `find . -type f -print` 1.189 + eval "make all" 1.190 + ) || exit $? 1.191 + 1.192 + # build the sources 1.193 + # (we cannot use %{l_make}, because teTeX dislikes absolute paths 1.194 + # for make. Instead we work-around via $PATH. The redundant 1.195 + # "eval" around the call is just to shut-up speclint) 1.196 + eval "make all" 1.197 + 1.198 +%install 1.199 + # reinstall teTeX texmf stuff 1.200 + # (because RPM 5 implicitly removes $RPM_BUILD_ROOT at begin of %install) 1.201 + %{l_shtool} mkdir -f -p -m 755 \ 1.202 + $RPM_BUILD_ROOT%{l_prefix}/share/texmf 1.203 + %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\ 1.204 + ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $? 1.205 + 1.206 + # perform the standard installation procdure of teTeX 1.207 + # (we cannot use %{l_make}, because teTeX dislikes absolute paths 1.208 + # for make. Instead we work-around via $PATH. The redundant 1.209 + # "eval" around the call is just to shut-up speclint) 1.210 + eval "make install" 1.211 + 1.212 + # create dynamically generated font directory 1.213 + %{l_shtool} mkdir -f -p -m 755 \ 1.214 + $RPM_BUILD_ROOT%{l_prefix}/var/tetex 1.215 + %{l_shtool} mkdir -f -p -m 777 \ 1.216 + $RPM_BUILD_ROOT%{l_prefix}/var/tetex/fonts 1.217 + 1.218 + # cleanup the installation 1.219 + rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir 1.220 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 1.221 + 1.222 + # determine installation files 1.223 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 1.224 + %{l_files_std} \ 1.225 + '%config %{l_prefix}/share/texmf/dvipdfm/config/config' \ 1.226 + '%config %{l_prefix}/share/texmf/dvips/config/config.ps' \ 1.227 + '%config %{l_prefix}/share/texmf/metafont/misc/modes.mf' \ 1.228 + '%config %{l_prefix}/share/texmf/web2c/mktex.cnf' 1.229 + 1.230 +%files -f files 1.231 + 1.232 +%clean 1.233 +