123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- %define jppatchsrcver 2018.2-jp20190902
- %define jppatch l2h-2018.2-jp3.2b1.22.patch
- %define ownlibdir %{_prefix}/lib/%{name}
- %define _tl_texmfvine %{_datadir}/texmf-dist
- Summary: LaTeX to HTML converter
- Summary(ja): LaTeX ファイルを HTML 形式に変換するツール
- Name: latex2html
- Version: 2018.2
- Release: 1%{?_dist_release}
- License: GPL
- Group: Applications/Publishing
- Url: http://www.latex2html.org/
- Source0: https://github.com/latex2html/latex2html/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
- Source1: http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/data2/l2h-%{jppatchsrcver}.tar.gz
- # Patch0: l2h-vine.patch
- # https://github.com/latex2html/latex2html/issues/48
- # https://github.com/latex2html/latex2html/commit/ead9c5ade86d90b07f778b2fcb972f273d52c3c2
- Patch1: latex2html-2018.2-escape_var_in_regexp.patch
- Requires: texlive >= 2013
- Requires: ghostscript
- Requires: perl
- Requires: netpbm-progs
- BuildRequires: texlive-vtlpkg >= 2013
- BuildRequires: texlive >= 2013
- BuildRequires: ghostscript
- BuildRequires: perl
- BuildRequires: netpbm-progs
- BuildRequires: netpbm >= 9.12
- Conflicts: latex2html2002
- BuildArch: noarch
- Buildroot: %{_tmppath}/%{name}-%{version}-root
- Vendor: Project Vine
- Distribution: Vine Linux
- Packager: munepi
- %description
- LATEX2HTML is a conversion tool that allows documents written in LATEX to
- become part of the World-Wide Web. In addition, it offers an easy migration
- path towards authoring complex hyper-media documents using familiar
- word-processing concepts, including the power of a LATEX-like macro language
- capable of producing correctly structured HTML tags.
- LATEX2HTML replicates the basic structure of a LATEX document as a set of
- interconnected HTML files which can be explored using automatically generated
- navigation panels. The cross-references, citations, footnotes, the
- table-of-contents and the lists of figures and tables, are also translated
- into hypertext links. Formatting information which has equivalent “tags” in
- HTML (lists, quotes, paragraph-breaks, type-styles, etc.) is also converted
- appropriately. The remaining heavily formatted items such as mathematical
- equations, pictures etc. are converted to images which are placed
- automatically at the correct position in the final HTML document.
- LATEX2HTML extends LATEX by supporting arbitrary hypertext links and symbolic
- cross-references between evolving remote documents. It also allows the
- specification of conditional text and the inclusion of raw HTML commands.
- These hyper-media extensions to LATEX are available as new commands and
- environments from within a LATEX document.
- %prep
- %setup -q
- %__tar zxvf %{SOURCE1} -C $RPM_BUILD_DIR || exit 1
- %__patch -p1 < %{jppatch}
- # %%patch0 -p0 -b .vine
- %patch1 -b .escape
- # fix perl path in a few places:
- %__sed -i -e "s|^#!/perl|#!%{__perl}|" l2hconf.pin || exit 1
- %build
- ./configure \
- --prefix=%{_prefix} \
- --libdir=%{ownlibdir} \
- --shlibdir=%{ownlibdir} \
- \
- --with-perl=%{__perl} \
- --enable-images \
- --disable-pk \
- --enable-eps \
- --enable-png \
- --enable-gif \
- --with-gs=%{_bindir}/gs \
- --with-dvips=%{_bindir}/dvips \
- --with-latex=%{_bindir}/platex \
- --without-mktexlsr \
- --with-kanji=utf8 \
- ;
- %__make
- %install
- %__rm -rf $RPM_BUILD_ROOT
- ## fake root directory
- %__sed -e 's|/usr|'"${RPM_BUILD_ROOT}"'/usr|' \
- -e 's|bin/latex|bin/platex|' cfgcache.pm > cfgcache.pm.new || exit 1
- %__mv cfgcache.pm.new cfgcache.pm || exit 1
- %__make install
- (cd %{buildroot}
- for i in `grep -ir -l %{buildroot} *`; do
- %__perl -pi -e "s@%{buildroot}@@g" $i || exit 1
- %__chmod 755 $i
- done
- for i in `grep -ir -l %{_builddir} *`;
- do
- %__perl -pi -e "s@%{_builddir}@@g" $i || exit 1
- %__chmod 755 $i
- done
- )
- ## fix perl path in a few places:
- %__perl -pi -e "s#$RPM_BUILD_DIR/%{name}-%{version}#%{ownlibdir}#" $RPM_BUILD_ROOT%{ownlibdir}/cfgcache.pm || exit 1
- ## latin9.def url.sty: provided by texlive-collection-latex package
- (cd $RPM_BUILD_ROOT%{_tl_texmfvine}/tex/latex/html
- %__rm -f floatflt.ins latin9.def url.sty
- )
- (cd docs
- # ## changebar.sty: provided by texlive-collection-latexextra
- # %__rm -f changebar.sty
- export TEXINPUTS=:.:../texinputs
- ## article.cls don't provide \address.
- %__sed -i -e 's/\\author{\(.*\)}/\\author{\1}/' -e 's!\\address{!\\\\hoge!' \
- manual.tex || exit 1
- %__make clean
- %__make LATEX=platex manual.dvi
- %{_bindir}/dvipdfm manual.dvi || exit 1
- )
- ## NO use perl(Win32), which is required by perl(L2hos::Win32)
- %__rm -f $RPM_BUILD_ROOT%{ownlibdir}/L2hos/Win32.pm
- %post
- %_tl_touch_run texhash
- exit 0
- %postun
- if [ "$1" = 0 ]; then
- %_tl_touch_run texhash
- fi
- exit 0
- %posttrans
- %{_tl_exec_texhash}
- exit 0
- %clean
- %__rm -rf $RPM_BUILD_ROOT
- %files
- %defattr(-,root,root)
- %doc BUGS Changes FAQ INSTALL LICENSE MANIFEST README.md TODO
- %doc README.notice.jp README.patch-99.1jp README.patch-jp README.tech.jp
- %doc docs/ example/ tests/
- %doc dot.latex2html-init
- %{_bindir}/*
- %{ownlibdir}
- %{_tl_texmfvine}/tex/latex/html/
- %changelog
- * Tue Oct 22 2019 Toshiaki Ara <ara_t@384.jp> 2018.2-1
- - update to 2018.2
- - drop Patch0
- - add Patch1 for Perl 5.26
- - add several changes to build manual.pdf
- * Thu Aug 29 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2008-3
- - added BuildRequires: texlive-vtlpkg >= 2013
- - added some scriptlets to run mktexlsr
- * Sat Jan 28 2012 Munehiro Yamamoto <munepi@vinelinux.org> 2008-2
- - l2h-2K8-jp20110708
- - Requires, BuildRequires: s/texlive/texlive-common/ (for vl6 or higher)
- * Sun Sep 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2008-1
- - first release
|