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