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