Christoph Schug 23 лет назад
Родитель
Сommit
99ba79f187
2 измененных файлов с 180 добавлено и 0 удалено
  1. 33 0
      tex4ht/tex4ht.env
  2. 147 0
      tex4ht/tex4ht.spec

+ 33 - 0
tex4ht/tex4ht.env

@@ -0,0 +1,33 @@
+%%
+%%  @l_prefix@/etc/tex4ht/tex4ht.env
+%%
+t@l_prefix@/share/texmf/fonts/tfm/!
+i@l_prefix@/share/texmf/tex/generic/tex4ht/ht-fonts/iso8859/!
+i@l_prefix@/share/texmf/tex/generic/tex4ht/ht-fonts/alias/!
+%   bookkeeping for searched files
+l@l_prefix@/share/texmf/tex/generic/tex4ht/tex4ht.fls
+%   default scripts
+ s--- needs --- %%1.idv[%%2] ==> %%3 ---
+ b--- characters ---
+ g.gif
+%   remove protection
+S*
+%   dvi-to-gif
+%   dvips options
+%       magnification: -x mag  (e.g., -x 1200)
+%       page size:     -T x,y  (e.g., -T 14in,14in)
+Gdvips  -Pcmz -Pamz -mode ibmvga -D 110 -f %%1 -pp %%2 > zz%%4.ps
+Ggs -sDEVICE=ppm -sOutputFile=zz%%4.ppm -r110x110 -dTextAlphaBits=2 -dGraphicsAlphaBits=2 -q -dbatch -dNOPAUSE zz%%4.ps -c quit
+Gconvert  -crop 0x0 -density 110x110 -transparent '#FFFFFF' zz%%4.ppm %%3
+Grm zz%%4.ps
+Grm zz%%4.ppm
+%   t4ht -d%%2
+Mmv %%1 %%2%%3
+Ccp %%1 %%2%%3
+%   t4ht -d%%2 -m%%1
+Achmod %%1 %%2%%3
+%   empty gifs
+ Ecp  empty.gif %%1%%2
+%   validations, XSTL tranformations,...
+ Xmake -f NSGMLS name=%%1  ext=%%2
+%   end of file

+ 147 - 0
tex4ht/tex4ht.spec

@@ -0,0 +1,147 @@
+##
+##  tex4ht.spec -- OpenPKG RPM Specification
+##  Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
+##  Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
+##  Copyright (c) 2000-2003 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.
+##
+
+#   package information
+Name:         tex4ht
+Summary:      TeX-based authoring system for producing hypertext
+URL:          http://www.cis.ohio-state.edu/~gurari/TeX4ht/
+Vendor:       Eitan M. Gurari
+Packager:     The OpenPKG Project
+Distribution: OpenPKG [JUNK]
+Group:        Text
+License:      LPPL
+Version:      0
+Release:      20030127
+
+#   list of sources
+Source0:      http://www.cis.ohio-state.edu/~gurari/TeX4ht/ufiles.zip
+Source1:      http://www.cis.ohio-state.edu/~gurari/fix/newt4ht.zip
+Source2:      http://www.cis.ohio-state.edu/~gurari/fix/htf.zip
+Source3:      tex4ht.env
+
+#   build information
+Prefix:       %{l_prefix}
+BuildRoot:    %{l_buildroot}
+BuildPreReq:  OpenPKG, openpkg >= 20020206, infozip
+PreReq:       OpenPKG, openpkg >= 20020206, tetex, ghostscript, imagemagick
+AutoReq:      no
+AutoReqProv:  no
+
+%description
+    TeX4ht is a highly configurable TeX-based authoring system for producing
+    hypertext. It interacts with TeX-based applications through style files and
+    postprocessors, leaving the processing of the source files to the native
+    TeX compiler. Consequently, TeX4ht can handle the features of TeX-based
+    systems in general, and of the LaTeX and AMS style files in particular.
+
+%prep
+    rm -rf $RPM_BUILD_DIR/%{name}-%{version}
+    %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_DIR/%{name}-%{version}
+
+%build
+    cd $RPM_BUILD_DIR/%{name}-%{version}
+    %{l_prefix}/bin/unzip \
+        %{SOURCE newt4ht.zip} \
+        tex4ht.c t4ht.c
+    %{l_cc} -o tex4ht tex4ht.c -DENVFILE='"%{l_prefix}/etc/tex4ht/tex4ht.env"' \
+        -DHAVE_DIRENT_H
+    %{l_cc} -o t4ht   t4ht.c   -DENVFILE='"%{l_prefix}/etc/tex4ht/tex4ht.env"'
+
+%install
+    rm -rf $RPM_BUILD_ROOT
+    HT_BIN_FILES="ht htlatex httex httexi"
+
+    #   create directories
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/bin \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/tex4ht \
+        $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht
+
+    #   install binaries
+    %{l_shtool} install -c -s -m 755 \
+        %{name}-%{version}/tex4ht \
+        %{name}-%{version}/t4ht \
+        $RPM_BUILD_ROOT%{l_prefix}/bin/
+    for i in $HT_BIN_FILES; do
+        ln -s ../share/texmf/tex/generic/tex4ht/$i \
+            $RPM_BUILD_ROOT%{l_prefix}/bin/$i
+    done
+
+    #   install configuration file
+    %{l_shtool} install -c -m 644 \
+        -e 's;@l_prefix@;%{l_prefix};g' \
+        %{SOURCE tex4ht.env} \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/tex4ht/
+    ln -s ../../../../../etc/tex4ht/tex4ht.env \
+        $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/tex4ht.env
+
+    #   creating the so-called bookkeeping file
+    %{l_shtool} install -c -m 666 \
+        /dev/null \
+        $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/tex4ht.fls
+
+    #   unpacking original vendor source
+    %{l_prefix}/bin/unzip \
+        -d $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/ \
+        %{SOURCE ufiles.zip} \
+        -x tex4ht.env \*.c test\*.tex | %{l_shtool} prop
+
+    #   unpacking fix pack
+    %{l_prefix}/bin/unzip -o \
+        -d $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/ \
+        %{SOURCE newt4ht.zip} \
+        -x \*.c \*.exe | %{l_shtool} prop
+
+    #   unpacking fonts
+    %{l_prefix}/bin/unzip -o \
+        -d $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/ \
+        %{SOURCE htf.zip} | %{l_shtool} prop
+
+    #   fixing permissions
+    find $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/ \
+        -type d -exec chmod 755 {} \;
+    find $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/ \
+        -type f -exec chmod 644 {} \;
+    for i in $HT_BIN_FILES; do
+        chmod 755 $RPM_BUILD_ROOT%{l_prefix}/share/texmf/tex/generic/tex4ht/$i
+    done
+
+    #   building file list
+    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
+        '%config %{l_prefix}/etc/tex4ht/*' \
+        '%attr(0666,%{l_musr},%{l_mgrp}) \
+            %{l_prefix}/share/texmf/tex/generic/tex4ht/tex4ht.fls'
+
+%files -f files
+
+%clean
+    rm -rf $RPM_BUILD_ROOT
+
+%post
+    %{l_prefix}/bin/mktexlsr 2>&1 >/dev/null || true
+
+%postun
+    %{l_prefix}/bin/mktexlsr 2>&1 >/dev/null || true
+