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