[5540] | 1 | %define pkgname latex2html |
---|
| 2 | |
---|
[521] | 3 | %define ver 2002 |
---|
| 4 | %define srcver 2002-2-1 |
---|
| 5 | %define jpver 1.9 |
---|
| 6 | %define _prefix /usr |
---|
| 7 | %define exec_texhash [ -x %{_bindir}/texhash ] && %{_bindir}/env - %{_bindir}/texhash 2> /dev/null |
---|
| 8 | |
---|
[5540] | 9 | %define ownlibdir %{_prefix}/lib/%{pkgname} |
---|
| 10 | |
---|
[521] | 11 | Summary: LaTeX to HTML converter. |
---|
| 12 | Summary(ja): LaTeX ファイルを HTML 形式に変換するツール |
---|
[5540] | 13 | Name: latex2html2002 |
---|
[521] | 14 | Version: %{ver} |
---|
[5540] | 15 | Release: 9%{?_dist_release} |
---|
[521] | 16 | License: distributable |
---|
| 17 | Group: Applications/Publishing |
---|
| 18 | Url: http://www.latex2html.org/ |
---|
| 19 | Source0: http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/latex2html-%{srcver}.tar.gz |
---|
| 20 | Source1: l2h-japanese.perl |
---|
| 21 | # vine patch |
---|
| 22 | Patch0: http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/data/l2h-%{srcver}+jp%{jpver}.patch.gz |
---|
| 23 | Patch1: l2h-vine.patch |
---|
| 24 | Patch2: latex2html.gs510.diff |
---|
| 25 | Patch3: l2h-netpbm-10.25.patch |
---|
| 26 | BuildArch: noarch |
---|
[5540] | 27 | %if %{?_dist_release} == "vl5" |
---|
| 28 | Requires: tetex |
---|
| 29 | %endif |
---|
| 30 | %if %{?_dist_release} >= "vl6" |
---|
| 31 | Requires: texlive-common |
---|
| 32 | %endif |
---|
| 33 | Requires: ghostscript >= 5.50 |
---|
| 34 | Requires: perl |
---|
[521] | 35 | Requires: netpbm-progs |
---|
[5540] | 36 | %if %{?_dist_release} == "vl5" |
---|
| 37 | BuildRequires: tetex |
---|
| 38 | %endif |
---|
| 39 | %if %{?_dist_release} >= "vl6" |
---|
| 40 | BuildRequires: texlive-common |
---|
| 41 | %endif |
---|
| 42 | BuildRequires: perl |
---|
| 43 | BuildRequires: netpbm-progs |
---|
| 44 | BuildRequires: netpbm >= 9.12 |
---|
| 45 | |
---|
| 46 | Buildroot: %{_tmppath}/%{pkgname}-%{version}-root |
---|
[521] | 47 | Vendor: Project Vine |
---|
| 48 | Distribution: Vine Linux |
---|
[5540] | 49 | Packager: munepi |
---|
[521] | 50 | |
---|
| 51 | %description |
---|
| 52 | Elaborate perl program to convert latex documents to html, using LaTeX |
---|
| 53 | to process images and equations. |
---|
| 54 | |
---|
| 55 | %description -l ja |
---|
| 56 | Latex ファイルを HTML形式に変換するperlプログラムです. |
---|
| 57 | |
---|
| 58 | %prep |
---|
| 59 | %setup -q -n latex2html-%{srcver} |
---|
[5540] | 60 | %patch0 -p1 |
---|
[521] | 61 | %patch1 -p0 |
---|
[5540] | 62 | %__cp -f %{SOURCE1} styles/japanese.perl |
---|
[521] | 63 | cd config |
---|
| 64 | %patch2 -p0 |
---|
| 65 | cd .. |
---|
| 66 | %patch3 -p1 |
---|
| 67 | |
---|
[5540] | 68 | # fix perl path in a few places: |
---|
| 69 | %__sed -i -e "s|^#!/perl|#!%{__perl}|" l2hconf.pin || exit 1 |
---|
| 70 | |
---|
[521] | 71 | %build |
---|
| 72 | TMP=/var/tmp ./configure \ |
---|
[5540] | 73 | --with-gs=%{_bindir}/gs \ |
---|
| 74 | %if %{?_dist_release} == "vl6" |
---|
| 75 | --with-dvips=%{_bindir}/pdvips \ |
---|
| 76 | %endif |
---|
| 77 | --with-latex=%{_bindir}/platex \ |
---|
| 78 | --without-mktexlsr \ |
---|
| 79 | --with-perl=%{__perl} \ |
---|
| 80 | --prefix=%{_prefix} \ |
---|
| 81 | --enable-eps \ |
---|
| 82 | --enable-png \ |
---|
| 83 | --disable-gif \ |
---|
| 84 | --libdir=%{ownlibdir} \ |
---|
| 85 | --shlibdir=%{ownlibdir} |
---|
[521] | 86 | #./configure --prefix=%{_prefix} --sysconfdir=/etc --host=localhost\ |
---|
| 87 | # --enable-png --disable-gif --without-mktexlsr |
---|
[5540] | 88 | %__make |
---|
[521] | 89 | |
---|
| 90 | ## |
---|
| 91 | ## make several l2hconf.pm and wrapper |
---|
| 92 | ## |
---|
[5540] | 93 | %__sed -e 's/"jarticle"/"article"/' -e 's/japanese/english/' \ |
---|
[521] | 94 | -e 's/UNUSEACCENT = 1/UNUSEACCENT = 0/' \ |
---|
| 95 | -e 's/texexpand/texexpand-en/' \ |
---|
| 96 | l2hconf.pm > l2hconf_en.pm |
---|
[5540] | 97 | %__sed -e 's/#$TOHTML/$TOHTML = "|nkf -j";/' \ |
---|
[521] | 98 | -e 's/#$charset/$charset = "iso-2022-jp";/' \ |
---|
| 99 | l2hconf.pm > l2hconf_jis.pm |
---|
[5540] | 100 | %__sed -e 's/#$TOHTML/$TOHTML = "|nkf -s";/' \ |
---|
[521] | 101 | -e 's/#$charset/$charset = "Shift_JIS";/' \ |
---|
| 102 | l2hconf.pm > l2hconf_sjis.pm |
---|
[5540] | 103 | %__sed -e 's/#$TOHTML/$TOHTML = "|nkf -e";/' \ |
---|
[521] | 104 | -e 's/#$charset/$charset = "EUC-JP";/' \ |
---|
| 105 | l2hconf.pm > l2hconf_euc.pm |
---|
[5540] | 106 | %__sed -e 's/#$TOHTML/$TOHTML = "|nkf -w";/' \ |
---|
[521] | 107 | -e 's/#$charset/$charset = "UTF-8";/' \ |
---|
| 108 | l2hconf.pm > l2hconf_utf8.pm |
---|
[5540] | 109 | %__cp l2hconf.pm l2hconf_png_ja.pm |
---|
| 110 | %__sed -e 's/"jarticle"/"article"/' -e 's/japanese/english/' \ |
---|
[521] | 111 | l2hconf.pm > l2hconf_png_en.pm |
---|
[5540] | 112 | %__sed 's/png gif/gif png/' l2hconf.pm > l2hconf_gif_ja.pm |
---|
| 113 | %__sed 's/png gif/gif png/' l2hconf_png_en.pm > l2hconf_gif_en.pm |
---|
| 114 | %__sed -e 's/${FROMNATIVE} $infile |/<$infile/' texexpand > texexpand-en |
---|
| 115 | %__sed -e "s@LIBDIR@%{ownlibdir}@" -e "s@BINDIR@%{_bindir}@" l2h-wrapper-temp > l2h-wrapper |
---|
[521] | 116 | |
---|
| 117 | |
---|
| 118 | %install |
---|
[5540] | 119 | %__rm -rf $RPM_BUILD_ROOT |
---|
| 120 | |
---|
[521] | 121 | # fake root directory |
---|
[5540] | 122 | %__sed -e 's|/usr|'"${RPM_BUILD_ROOT}"'/usr|' \ |
---|
| 123 | -e 's|bin/latex|bin/platex|' cfgcache.pm > cfgcache.pm.new || exit 1 |
---|
| 124 | %__mv cfgcache.pm.new cfgcache.pm || exit 1 |
---|
| 125 | %__mkdir_p $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html || exit 1 |
---|
| 126 | %__make install |
---|
[521] | 127 | |
---|
| 128 | (cd %{buildroot} |
---|
[5540] | 129 | %__perl -pi -e 's@iso-8859-1@euc-jp@g' %{_bindir}/latex2html || exit 1 |
---|
[521] | 130 | for i in `grep -ir -l %{buildroot} *`; |
---|
| 131 | do |
---|
[5540] | 132 | %__perl -pi -e "s@%{buildroot}@@g" $i || exit 1 |
---|
| 133 | %__chmod 755 $i |
---|
[521] | 134 | done |
---|
| 135 | for i in `grep -ir -l %{_builddir} *`; |
---|
| 136 | do |
---|
[5540] | 137 | %__perl -pi -e "s@%{_builddir}@@g" $i || exit 1 |
---|
| 138 | %__chmod 755 $i |
---|
[521] | 139 | done |
---|
| 140 | ) |
---|
| 141 | |
---|
| 142 | # fix perl path in a few places: |
---|
[5540] | 143 | %__perl -pi -e 's#/usr/local/bin/perl#%{__perl}#' $RPM_BUILD_ROOT%{ownlibdir}/cweb2html/cweb2html || exit 1 |
---|
| 144 | %__perl -pi -e 's#/usr/local/bin/perl#%{__perl}#' $RPM_BUILD_ROOT%{ownlibdir}/makeseg/makeseg || exit 1 |
---|
| 145 | %__perl -pi -e 's#/usr/local/bin/perl#%{__perl}#' $RPM_BUILD_ROOT%{ownlibdir}/makemap || exit 1 |
---|
[521] | 146 | |
---|
[5540] | 147 | %__perl -pi -e "s#$RPM_BUILD_DIR/%{pkgname}-%{version}#%{ownlibdir}#" $RPM_BUILD_ROOT%{ownlibdir}/cfgcache.pm || exit 1 |
---|
[521] | 148 | |
---|
| 149 | (cd $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html |
---|
[5540] | 150 | %__rm -f floatflt.ins latin9.def url.sty |
---|
[521] | 151 | ) |
---|
| 152 | |
---|
| 153 | (cd docs |
---|
[5540] | 154 | # ## changebar.sty: provided by texlive-collection-latexextra |
---|
| 155 | # %__rm -f changebar.sty |
---|
| 156 | export TEXINPUTS=:.:../texinputs |
---|
[521] | 157 | |
---|
[5540] | 158 | ## article.cls don't provide \address. |
---|
| 159 | %__sed -i -e 's/\\author{\(.*\)}/\\author{\1/' -e 's!\\address{!\\\\hoge!' manual.tex || exit 1 |
---|
| 160 | %__make clean |
---|
| 161 | %__make LATEX=platex manual.dvi |
---|
| 162 | dvipdfmx manual.dvi || exit 1 |
---|
| 163 | ) |
---|
[521] | 164 | |
---|
| 165 | #### l2h wrapper install |
---|
[5540] | 166 | %__cp l2hconf_{gif,png}_{ja,en}.pm $RPM_BUILD_ROOT%{ownlibdir} || exit 1 |
---|
| 167 | %__install -c -m 0755 l2h-wrapper $RPM_BUILD_ROOT%{_bindir}/l2h || exit 1 |
---|
[521] | 168 | |
---|
| 169 | ## NO use perl(Win32), which is required by perl(L2hos::Win32) |
---|
[5540] | 170 | %__rm -f $RPM_BUILD_ROOT%{ownlibdir}/L2hos/Win32.pm |
---|
[521] | 171 | |
---|
| 172 | %post |
---|
| 173 | %{exec_texhash} |
---|
| 174 | exit 0 |
---|
| 175 | |
---|
| 176 | |
---|
| 177 | %postun |
---|
| 178 | %{exec_texhash} |
---|
| 179 | exit 0 |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | %clean |
---|
[5540] | 183 | %__rm -rf $RPM_BUILD_ROOT |
---|
[521] | 184 | |
---|
| 185 | %files |
---|
| 186 | %defattr(-,root,root) |
---|
| 187 | %doc BUGS Changes FAQ INSTALL LICENSE MANIFEST README TODO |
---|
| 188 | %doc docs/ example/ tests/ |
---|
| 189 | %doc dot.latex2html-init |
---|
| 190 | %{_bindir}/* |
---|
[5540] | 191 | %{ownlibdir} |
---|
[521] | 192 | %{_datadir}/texmf/tex/latex/html/ |
---|
| 193 | |
---|
| 194 | %changelog |
---|
[5540] | 195 | * Sun Jan 29 2012 Munehiro Yamamoto <munepi@vinelinux.org> 2002-9 |
---|
| 196 | - Requires, BuildRequires: s/texlive/texlive-common/ (for vl6 or higher) |
---|
| 197 | |
---|
| 198 | * Thu Aug 12 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2002-8 |
---|
| 199 | - TeX Live 2009 |
---|
| 200 | - used rpm macros for some commands |
---|
| 201 | - defined %%pkgname to latex2html |
---|
| 202 | - changed %%ownlibdir to %%{_prefix}/lib/%%{pkgname} |
---|
| 203 | - added configure options: |
---|
| 204 | --with-dvips=%%{_bindir}/pdvips \ |
---|
| 205 | --with-latex=%%{_bindir}/platex \ |
---|
| 206 | |
---|
[521] | 207 | * Sun Mar 29 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2002-7 |
---|
[5540] | 208 | - comment out "use Win32;" in %%{ownlibdir}/L2hos/Win32.pm |
---|
[521] | 209 | |
---|
| 210 | * Sun Mar 29 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2002-6 |
---|
| 211 | - applied new versioning policy |
---|
| 212 | - spec in utf8 |
---|
| 213 | - corrected generating docs/manual.pdf process |
---|
| 214 | |
---|
| 215 | * Wed Aug 31 2005 KOBAYASHI Taizo <tkoba@vinelinux.org> 2002-0vl5 |
---|
| 216 | - source update |
---|
| 217 | |
---|
| 218 | * Wed Jun 11 2003 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2002-0vl4 |
---|
| 219 | - patch2 update |
---|
| 220 | - source update (23-May-2003 07:15) |
---|
| 221 | |
---|
| 222 | * Tue Oct 08 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2002-0vl3 |
---|
| 223 | - source update |
---|
| 224 | |
---|
| 225 | * Fri Jun 21 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2002-0vl2 |
---|
| 226 | - source update |
---|
| 227 | |
---|
| 228 | * Sun Jun 09 2002 KOBAYASHI R. Taizo <tkoba@vinelinux.org> 2002-0vl1 |
---|
| 229 | - update to 2002 |
---|
| 230 | - added BuildPrereq: netpbm >= 9.12 |
---|
| 231 | |
---|
| 232 | * Fri Mar 29 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2000.1-0.1vl4 |
---|
| 233 | - added BuildPreReq: tetex |
---|
| 234 | |
---|
| 235 | * Fri Mar 29 2002 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 2000.1-0.1vl3 |
---|
| 236 | - %%post and %%postun fixed ([VineSeed:06257], thanks Tsuchimura-san) |
---|
| 237 | |
---|
| 238 | * Wed Jul 18 2001 KOBAYASHI R. Taizo <tkoba@ike-dyn.ritsumei.ac.jp> 0.1vl2 |
---|
| 239 | - source update |
---|
| 240 | - fix requires tag |
---|
| 241 | |
---|
| 242 | * Wed Jul 18 2001 KOBAYASHI R. Taizo <tkoba@ike-dyn.ritsumei.ac.jp> |
---|
| 243 | - latex2html-2000.1-0.1vl1 |
---|
| 244 | - update for teTeX |
---|
| 245 | |
---|
| 246 | * Thu Aug 17 2000 Jun Nishii <jun@vinelinux.org> |
---|
| 247 | - latex2html-99.2-0.8vl2 |
---|
| 248 | - fix requires tag |
---|
| 249 | |
---|
| 250 | * Mon Jul 31 2000 Jun Nishii <jun@vinelinux.org> |
---|
| 251 | - latex2html-99.2-0.8vl1 |
---|
| 252 | - use png |
---|
| 253 | |
---|
| 254 | * Fri Jan 28 2000 Yasuhide OOMORI <baoying@flatout.org> |
---|
| 255 | - [latex2html-98.1p1-5] |
---|
| 256 | - Modified to show generator correctly. |
---|
| 257 | - Setup quietly. |
---|
| 258 | |
---|
| 259 | * Fri Jan 7 2000 Jun Nishii <jun@vinelinux.org> |
---|
| 260 | - [latex2html-98.1p1-4] |
---|
| 261 | - change group |
---|
| 262 | |
---|
| 263 | * Sun Nov 14 1999 Jun Nishii <jun@flatout.org> |
---|
| 264 | - build for Vine-2.0 |
---|
| 265 | |
---|
| 266 | * Mon May 3 1999 Jun Nishii <jun@flatout.org> |
---|
| 267 | - modify post installation script |
---|
| 268 | - build for Vine |
---|
| 269 | |
---|
| 270 | * Tue Nov 10 1998 Jun Nishii <jun@flatout.org> |
---|
| 271 | - first build for PJE-0.3alpha |
---|
| 272 | |
---|