latex2html-vl.spec 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. %define jppatchsrcver 2018.2-jp20190902
  2. %define jppatch l2h-2018.2-jp3.2b1.22.patch
  3. %define ownlibdir %{_prefix}/lib/%{name}
  4. %define _tl_texmfvine %{_datadir}/texmf-dist
  5. Summary: LaTeX to HTML converter
  6. Summary(ja): LaTeX ファイルを HTML 形式に変換するツール
  7. Name: latex2html
  8. Version: 2018.2
  9. Release: 1%{?_dist_release}
  10. License: GPL
  11. Group: Applications/Publishing
  12. Url: http://www.latex2html.org/
  13. Source0: https://github.com/latex2html/latex2html/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
  14. Source1: http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/data2/l2h-%{jppatchsrcver}.tar.gz
  15. # Patch0: l2h-vine.patch
  16. # https://github.com/latex2html/latex2html/issues/48
  17. # https://github.com/latex2html/latex2html/commit/ead9c5ade86d90b07f778b2fcb972f273d52c3c2
  18. Patch1: latex2html-2018.2-escape_var_in_regexp.patch
  19. Requires: texlive >= 2013
  20. Requires: ghostscript
  21. Requires: perl
  22. Requires: netpbm-progs
  23. BuildRequires: texlive-vtlpkg >= 2013
  24. BuildRequires: texlive >= 2013
  25. BuildRequires: ghostscript
  26. BuildRequires: perl
  27. BuildRequires: netpbm-progs
  28. BuildRequires: netpbm >= 9.12
  29. Conflicts: latex2html2002
  30. BuildArch: noarch
  31. Buildroot: %{_tmppath}/%{name}-%{version}-root
  32. Vendor: Project Vine
  33. Distribution: Vine Linux
  34. Packager: munepi
  35. %description
  36. LATEX2HTML is a conversion tool that allows documents written in LATEX to
  37. become part of the World-Wide Web. In addition, it offers an easy migration
  38. path towards authoring complex hyper-media documents using familiar
  39. word-processing concepts, including the power of a LATEX-like macro language
  40. capable of producing correctly structured HTML tags.
  41. LATEX2HTML replicates the basic structure of a LATEX document as a set of
  42. interconnected HTML files which can be explored using automatically generated
  43. navigation panels. The cross-references, citations, footnotes, the
  44. table-of-contents and the lists of figures and tables, are also translated
  45. into hypertext links. Formatting information which has equivalent “tags” in
  46. HTML (lists, quotes, paragraph-breaks, type-styles, etc.) is also converted
  47. appropriately. The remaining heavily formatted items such as mathematical
  48. equations, pictures etc. are converted to images which are placed
  49. automatically at the correct position in the final HTML document.
  50. LATEX2HTML extends LATEX by supporting arbitrary hypertext links and symbolic
  51. cross-references between evolving remote documents. It also allows the
  52. specification of conditional text and the inclusion of raw HTML commands.
  53. These hyper-media extensions to LATEX are available as new commands and
  54. environments from within a LATEX document.
  55. %prep
  56. %setup -q
  57. %__tar zxvf %{SOURCE1} -C $RPM_BUILD_DIR || exit 1
  58. %__patch -p1 < %{jppatch}
  59. # %%patch0 -p0 -b .vine
  60. %patch1 -b .escape
  61. # fix perl path in a few places:
  62. %__sed -i -e "s|^#!/perl|#!%{__perl}|" l2hconf.pin || exit 1
  63. %build
  64. ./configure \
  65. --prefix=%{_prefix} \
  66. --libdir=%{ownlibdir} \
  67. --shlibdir=%{ownlibdir} \
  68. \
  69. --with-perl=%{__perl} \
  70. --enable-images \
  71. --disable-pk \
  72. --enable-eps \
  73. --enable-png \
  74. --enable-gif \
  75. --with-gs=%{_bindir}/gs \
  76. --with-dvips=%{_bindir}/dvips \
  77. --with-latex=%{_bindir}/platex \
  78. --without-mktexlsr \
  79. --with-kanji=utf8 \
  80. ;
  81. %__make
  82. %install
  83. %__rm -rf $RPM_BUILD_ROOT
  84. ## fake root directory
  85. %__sed -e 's|/usr|'"${RPM_BUILD_ROOT}"'/usr|' \
  86. -e 's|bin/latex|bin/platex|' cfgcache.pm > cfgcache.pm.new || exit 1
  87. %__mv cfgcache.pm.new cfgcache.pm || exit 1
  88. %__make install
  89. (cd %{buildroot}
  90. for i in `grep -ir -l %{buildroot} *`; do
  91. %__perl -pi -e "s@%{buildroot}@@g" $i || exit 1
  92. %__chmod 755 $i
  93. done
  94. for i in `grep -ir -l %{_builddir} *`;
  95. do
  96. %__perl -pi -e "s@%{_builddir}@@g" $i || exit 1
  97. %__chmod 755 $i
  98. done
  99. )
  100. ## fix perl path in a few places:
  101. %__perl -pi -e "s#$RPM_BUILD_DIR/%{name}-%{version}#%{ownlibdir}#" $RPM_BUILD_ROOT%{ownlibdir}/cfgcache.pm || exit 1
  102. ## latin9.def url.sty: provided by texlive-collection-latex package
  103. (cd $RPM_BUILD_ROOT%{_tl_texmfvine}/tex/latex/html
  104. %__rm -f floatflt.ins latin9.def url.sty
  105. )
  106. (cd docs
  107. # ## changebar.sty: provided by texlive-collection-latexextra
  108. # %__rm -f changebar.sty
  109. export TEXINPUTS=:.:../texinputs
  110. ## article.cls don't provide \address.
  111. %__sed -i -e 's/\\author{\(.*\)}/\\author{\1}/' -e 's!\\address{!\\\\hoge!' \
  112. manual.tex || exit 1
  113. %__make clean
  114. %__make LATEX=platex manual.dvi
  115. %{_bindir}/dvipdfm manual.dvi || exit 1
  116. )
  117. ## NO use perl(Win32), which is required by perl(L2hos::Win32)
  118. %__rm -f $RPM_BUILD_ROOT%{ownlibdir}/L2hos/Win32.pm
  119. %post
  120. %_tl_touch_run texhash
  121. exit 0
  122. %postun
  123. if [ "$1" = 0 ]; then
  124. %_tl_touch_run texhash
  125. fi
  126. exit 0
  127. %posttrans
  128. %{_tl_exec_texhash}
  129. exit 0
  130. %clean
  131. %__rm -rf $RPM_BUILD_ROOT
  132. %files
  133. %defattr(-,root,root)
  134. %doc BUGS Changes FAQ INSTALL LICENSE MANIFEST README.md TODO
  135. %doc README.notice.jp README.patch-99.1jp README.patch-jp README.tech.jp
  136. %doc docs/ example/ tests/
  137. %doc dot.latex2html-init
  138. %{_bindir}/*
  139. %{ownlibdir}
  140. %{_tl_texmfvine}/tex/latex/html/
  141. %changelog
  142. * Tue Oct 22 2019 Toshiaki Ara <ara_t@384.jp> 2018.2-1
  143. - update to 2018.2
  144. - drop Patch0
  145. - add Patch1 for Perl 5.26
  146. - add several changes to build manual.pdf
  147. * Thu Aug 29 2013 Munehiro Yamamoto <munepi@vinelinux.org> 2008-3
  148. - added BuildRequires: texlive-vtlpkg >= 2013
  149. - added some scriptlets to run mktexlsr
  150. * Sat Jan 28 2012 Munehiro Yamamoto <munepi@vinelinux.org> 2008-2
  151. - l2h-2K8-jp20110708
  152. - Requires, BuildRequires: s/texlive/texlive-common/ (for vl6 or higher)
  153. * Sun Sep 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2008-1
  154. - first release