latex2html-vl.spec 5.1 KB

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