tetex/tetex.spec

Mon, 17 Sep 2012 19:10:10 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 17 Sep 2012 19:10:10 +0200
changeset 689
9fe04d4d4e5a
parent 515
2f4b17c140a1
permissions
-rw-r--r--

Update to new version of vendor software although Oracle fails to deliver.
More specifically, newer db(3) patch revisions exist but Oracle has
removed them from the canonical download server URI for Berkely DB.

michael@505 1 ##
michael@505 2 ## tetex.spec -- OpenPKG RPM Package Specification
michael@505 3 ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
michael@505 4 ##
michael@505 5 ## Permission to use, copy, modify, and distribute this software for
michael@505 6 ## any purpose with or without fee is hereby granted, provided that
michael@505 7 ## the above copyright notice and this permission notice appear in all
michael@505 8 ## copies.
michael@505 9 ##
michael@505 10 ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
michael@505 11 ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@505 12 ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@505 13 ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@505 14 ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@505 15 ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@505 16 ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@505 17 ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@505 18 ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@505 19 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@505 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@505 21 ## SUCH DAMAGE.
michael@505 22 ##
michael@505 23
michael@505 24 # package versions
michael@505 25 %define V_base 3.0
michael@505 26 %define V_src 3.0
michael@505 27 %define V_texmf 3.0
michael@505 28 %define V_xmltex 20020625
michael@505 29 %define V_passivetex 20031022
michael@505 30
michael@505 31 # package information
michael@505 32 Name: tetex
michael@505 33 Summary: The TeX Typesetting System
michael@505 34 URL: http://tug.org/teTeX/
michael@505 35 Vendor: Thomas Esser et al.
michael@505 36 Packager: OpenPKG Foundation e.V.
michael@505 37 Distribution: OpenPKG Community
michael@505 38 Class: BASE
michael@505 39 Group: Typesetting
michael@505 40 License: GPL
michael@505 41 Version: %{V_src}
michael@506 42 Release: 20120800
michael@505 43
michael@505 44 # list of sources
michael@505 45 Source0: ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-src-%{V_src}.tar.gz
michael@505 46 Source1: ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/%{V_base}/distrib/tetex-texmf-%{V_texmf}.tar.gz
michael@505 47 Source2: http://download.openpkg.org/components/versioned/tetex/passivetex-%{V_passivetex}.zip
michael@505 48 Source3: http://download.openpkg.org/components/versioned/tetex/base-%{V_xmltex}.zip
michael@505 49 Patch0: tetex.patch
michael@505 50
michael@505 51 # build information
michael@505 52 BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, gcc::with_cxx = yes, infozip, flex, bison
michael@505 53 PreReq: OpenPKG, openpkg >= 20100101, perl
michael@505 54 BuildPreReq: png, zlib
michael@505 55 PreReq: png, zlib
michael@505 56
michael@505 57 %description
michael@505 58 teTeX is a complete TeX distribution for Unix compatible systems,
michael@505 59 maintained by Thomas Esser. It is based on Karl Berry's original
michael@505 60 Web2c distribution. TeX was invented by Donald E. Knuth, and the
michael@505 61 most popular TeX macro set (LaTeX) for TeX was invented by Leslie
michael@505 62 Lamport. The OpenPKG teTeX package also contains David Carlisle'
michael@505 63 xmltex (namespace-aware XML parser written in TeX) and Sebastian
michael@505 64 Rahtz' PassiveTeX (XSL-FO rendering engine).
michael@505 65
michael@505 66 %track
michael@505 67 prog tetex:tetex-src = {
michael@505 68 version = %{V_src}
michael@505 69 url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/
michael@505 70 regex = ((\d+\.)+\d+)
michael@505 71 url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/
michael@505 72 regex = tetex-src-(__VER__)\.tar\.gz
michael@505 73 }
michael@505 74 prog tetex:tetex-texmf = {
michael@505 75 version = %{V_texmf}
michael@505 76 url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/
michael@505 77 regex = ((\d+\.)+\d+)
michael@505 78 url = ftp://tug.ctan.org/tex-archive/systems/unix/teTeX/__NEWVER__/distrib/
michael@505 79 regex = tetex-texmf-(__VER__)\.tar\.gz
michael@505 80 }
michael@505 81
michael@505 82 %prep
michael@505 83 %setup -q -n tetex-src-%{V_src}
michael@505 84 %patch -p0
michael@505 85
michael@505 86 # teTeX requires the texmf stuff to be already in place
michael@505 87 # for building and installing the source parts.
michael@505 88 %{l_shtool} mkdir -f -p -m 755 \
michael@505 89 $RPM_BUILD_ROOT%{l_prefix}/share/texmf
michael@505 90 %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\
michael@505 91 ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $?
michael@505 92
michael@505 93 # add XMLTeX (XML parsing via TeX)
michael@505 94 ( cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex
michael@505 95 %{l_prefix}/bin/unzip -q -x %{SOURCE base-%{V_xmltex}.zip}
michael@505 96 mv base xmltex
michael@505 97 ) || exit $?
michael@505 98 ( echo ""
michael@505 99 echo "# XMLTeX (XML parsing via TeX) [does not work as expected here]"
michael@505 100 echo "xmltex latex language.dat xmltex.ini"
michael@505 101 echo "pdfxmltex pdflatex language.dat pdfxmltex.ini"
michael@505 102 echo ""
michael@505 103 ) >>texk/web2c/fmtutil.in
michael@505 104 ( echo ""
michael@505 105 echo "% XMLTeX (XML parsing via TeX)"
michael@505 106 echo "main_memory.xmltex = 2500000"
michael@505 107 echo "main_memory.pdfxmltex = 2500000"
michael@505 108 echo "param_size.xmltex = 1500"
michael@505 109 echo "param_size.pdfxmltex = 1500"
michael@505 110 echo "stack_size.xmltex = 1500"
michael@505 111 echo "stack_size.pdfxmltex = 1500"
michael@505 112 echo "hash_extra.xmltex = 50000"
michael@505 113 echo "hash_extra.pdfxmltex = 50000"
michael@505 114 echo "string_vacancies.xmltex = 45000"
michael@505 115 echo "string_vacancies.pdfxmltex = 45000"
michael@505 116 echo "pool_free.xmltex = 47500"
michael@505 117 echo "pool_free.pdfxmltex = 47500"
michael@505 118 echo "nest_size.xmltex = 500"
michael@505 119 echo "nest_size.pdfxmltex = 500"
michael@505 120 echo "save_size.xmltex = 10000"
michael@505 121 echo "save_size.pdfxmltex = 10000"
michael@505 122 echo "pool_size.xmltex = 500000"
michael@505 123 echo "pool_size.pdfxmltex = 500000"
michael@505 124 echo "max_strings.xmltex = 55000"
michael@505 125 echo "max_strings.pdfxmltex = 55000"
michael@505 126 echo "buf_size.xmltex = 200000"
michael@505 127 echo "buf_size.pdfxmltex = 200000"
michael@505 128 echo ""
michael@505 129 ) >>texk/kpathsea/texmf.in
michael@505 130
michael@505 131 # add PassiveTeX (XSL-FO to DVI/PDF translation via TeX)
michael@505 132 ( %{l_shtool} mkdir -f -p -m 755 \
michael@505 133 $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
michael@505 134 cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/latex/passivetex
michael@505 135 %{l_prefix}/bin/unzip -q -x %{SOURCE passivetex-%{V_passivetex}.zip}
michael@505 136 rm -f ChangeLog Makefile README.passivetex send
michael@505 137 rm -rf test
michael@505 138 ) || exit $?
michael@505 139
michael@505 140 # minor fixes to the teTeX sources
michael@505 141 %{l_shtool} subst \
michael@505 142 -e '1s;/usr/bin/perl;/usr/bin/env perl;' \
michael@505 143 texk/*/t1mapper
michael@505 144 %{l_shtool} subst \
michael@505 145 -e "s;\(\$(scriptdir)/fmtutil-sys --all\);\1 --fmtdir $RPM_BUILD_ROOT%{l_prefix}/share/texmf/web2c;" \
michael@505 146 -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;," \
michael@505 147 Makefile.in
michael@505 148
michael@505 149 %build
michael@505 150 # configure the system by using the (wrong) paths to the temporary
michael@505 151 # installation area, followed by by a step for fixing the paths
michael@505 152 # (to the correct values) inside the kpathsea library (which
michael@593 153 # performs the runtime searches). This way we get all the magic
michael@505 154 # of the teTeX build system without problems, but still make sure
michael@593 155 # that the builtin paths are correct.
michael@505 156 %{l_shtool} subst -s -v \
michael@505 157 -e 's;^vartexfonts =.*;vartexfonts = %{l_prefix}/var/tetex/fonts;' \
michael@505 158 texk/make/paths.mk
michael@505 159 CC="%{l_cc}" \
michael@505 160 CXX="%{l_cxx}" \
michael@505 161 CFLAGS="%{l_cflags -O}" \
michael@505 162 CXXFLAGS="%{l_cxxflags -O}" \
michael@505 163 CPPFLAGS="%{l_cppflags}" \
michael@505 164 LEX="%{l_prefix}/bin/flex" \
michael@505 165 ./configure \
michael@505 166 --prefix=$RPM_BUILD_ROOT%{l_prefix} \
michael@505 167 --datadir=$RPM_BUILD_ROOT%{l_prefix}/share \
michael@505 168 --without-xdvik \
michael@505 169 --without-oxdvik \
michael@505 170 --without-x \
michael@505 171 --without-x11 \
michael@505 172 --without-x11win \
michael@505 173 --without-texinfo \
michael@505 174 --disable-multiplatform \
michael@505 175 --enable-gf \
michael@505 176 --with-system-pnglib \
michael@505 177 --with-pnglib-libdir=%{l_prefix}/lib \
michael@505 178 --with-pnglib-include=%{l_prefix}/include \
michael@505 179 --with-system-zlib \
michael@505 180 --with-zlib-libdir=%{l_prefix}/lib \
michael@505 181 --with-zlib-include=%{l_prefix}/include
michael@505 182 ( cd texk/kpathsea
michael@505 183 %{l_shtool} subst -v \
michael@505 184 -e "s;$RPM_BUILD_ROOT%{l_prefix};%{l_prefix};" \
michael@505 185 `find . -type f -print`
michael@515 186 eval "make all"
michael@505 187 ) || exit $?
michael@505 188
michael@505 189 # build the sources
michael@505 190 # (we cannot use %{l_make}, because teTeX dislikes absolute paths
michael@593 191 # for make. Instead we work around via $PATH. The redundant
michael@593 192 # "eval" around the call is just to shut up speclint)
michael@515 193 eval "make all"
michael@505 194
michael@505 195 %install
michael@505 196 # reinstall teTeX texmf stuff
michael@505 197 # (because RPM 5 implicitly removes $RPM_BUILD_ROOT at begin of %install)
michael@505 198 %{l_shtool} mkdir -f -p -m 755 \
michael@505 199 $RPM_BUILD_ROOT%{l_prefix}/share/texmf
michael@505 200 %{l_gzip} -d -c %{SOURCE tetex-texmf-%{V_texmf}.tar.gz} |\
michael@505 201 ( umask 0 && cd $RPM_BUILD_ROOT%{l_prefix}/share/texmf && %{l_tar} xf - ) || exit $?
michael@505 202
michael@505 203 # perform the standard installation procdure of teTeX
michael@505 204 # (we cannot use %{l_make}, because teTeX dislikes absolute paths
michael@593 205 # for make. Instead we work around via $PATH. The redundant
michael@593 206 # "eval" around the call is just to shut up speclint)
michael@505 207 eval "make install"
michael@505 208
michael@505 209 # create dynamically generated font directory
michael@505 210 %{l_shtool} mkdir -f -p -m 755 \
michael@505 211 $RPM_BUILD_ROOT%{l_prefix}/var/tetex
michael@505 212 %{l_shtool} mkdir -f -p -m 777 \
michael@505 213 $RPM_BUILD_ROOT%{l_prefix}/var/tetex/fonts
michael@505 214
michael@505 215 # cleanup the installation
michael@505 216 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
michael@505 217 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
michael@505 218
michael@505 219 # determine installation files
michael@505 220 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
michael@505 221 %{l_files_std} \
michael@505 222 '%config %{l_prefix}/share/texmf/dvipdfm/config/config' \
michael@505 223 '%config %{l_prefix}/share/texmf/dvips/config/config.ps' \
michael@505 224 '%config %{l_prefix}/share/texmf/metafont/misc/modes.mf' \
michael@505 225 '%config %{l_prefix}/share/texmf/web2c/mktex.cnf'
michael@505 226
michael@505 227 %files -f files
michael@505 228
michael@505 229 %clean
michael@505 230

mercurial