source: projects/specs/tags/6_0_REL/l/latex2html2002/latex2html-vl.spec @ 521

Revision 521, 6.6 KB checked in by daisuke, 14 years ago (diff)

import VineSeed package specs

Line 
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
8Summary: LaTeX to HTML converter.
9Summary(ja): LaTeX ファイルを HTML 形式に変換するツール
10Name: latex2html
11Version: %{ver}
12Release: 7%{?_dist_release}
13License: distributable
14Group: Applications/Publishing
15Url: http://www.latex2html.org/
16Source0: http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/latex2html-%{srcver}.tar.gz
17Source1: l2h-japanese.perl
18# vine patch
19Patch0: http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/data/l2h-%{srcver}+jp%{jpver}.patch.gz
20Patch1: l2h-vine.patch
21Patch2: latex2html.gs510.diff
22Patch3: l2h-netpbm-10.25.patch
23BuildArch: noarch
24Requires: tetex >= 3.0, perl, ghostscript >= 5.50
25Requires: netpbm-progs
26BuildPrereq: netpbm-progs, perl, tetex, dvipdfmx, netpbm >= 9.12
27Buildroot: %{_tmppath}/%{name}-root
28Vendor: Project Vine
29Distribution: Vine Linux
30
31%define ownlibdir %{_libdir}/%{name}
32
33%description
34Elaborate perl program to convert latex documents to html, using LaTeX
35to process images and equations. 
36
37%description -l ja
38Latex ファイルを HTML形式に変換するperlプログラムです.
39
40%prep
41%setup -q -n latex2html-%{srcver}
42%patch -p1
43%patch1 -p0
44cp -f %{SOURCE1} styles/japanese.perl
45cd config
46%patch2 -p0
47cd ..
48%patch3 -p1
49
50%build
51TMP=/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
62make
63
64##
65## make several l2hconf.pm and wrapper
66##
67sed -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
71sed -e 's/#$TOHTML/$TOHTML = "|nkf -j";/' \
72    -e 's/#$charset/$charset = "iso-2022-jp";/' \
73    l2hconf.pm > l2hconf_jis.pm
74sed -e 's/#$TOHTML/$TOHTML = "|nkf -s";/' \
75    -e 's/#$charset/$charset = "Shift_JIS";/' \
76    l2hconf.pm > l2hconf_sjis.pm
77sed -e 's/#$TOHTML/$TOHTML = "|nkf -e";/' \
78    -e 's/#$charset/$charset = "EUC-JP";/' \
79    l2hconf.pm > l2hconf_euc.pm
80sed -e 's/#$TOHTML/$TOHTML = "|nkf -w";/' \
81    -e 's/#$charset/$charset = "UTF-8";/' \
82    l2hconf.pm > l2hconf_utf8.pm
83cp l2hconf.pm l2hconf_png_ja.pm
84sed -e 's/"jarticle"/"article"/' -e 's/japanese/english/' \
85    l2hconf.pm > l2hconf_png_en.pm
86sed 's/png gif/gif png/' l2hconf.pm > l2hconf_gif_ja.pm
87sed 's/png gif/gif png/' l2hconf_png_en.pm > l2hconf_gif_en.pm
88sed -e 's/${FROMNATIVE} $infile |/<$infile/' texexpand > texexpand-en
89sed -e "s@LIBDIR@%{ownlibdir}@" -e "s@BINDIR@%{_bindir}@" l2h-wrapper-temp > l2h-wrapper
90
91
92%install
93# fake root directory
94sed -e 's|/usr|'"${RPM_BUILD_ROOT}"'/usr|' \
95        -e 's|bin/latex|bin/platex|' cfgcache.pm > cfgcache.pm.new
96mv cfgcache.pm.new cfgcache.pm
97mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html
98make install
99
100(cd %{buildroot}
101perl -pi -e 's@iso-8859-1@euc-jp@g' %{_bindir}/latex2html
102for i in `grep -ir -l %{buildroot} *`;
103do
104    perl -pi -e "s@%{buildroot}@@g" $i
105    chmod 755 $i
106done
107for i in `grep -ir -l %{_builddir} *`;
108do
109    perl -pi -e "s@%{_builddir}@@g" $i
110    chmod 755 $i
111done
112)
113
114# fix perl path in a few places:
115
116perl -pi -e 's#/usr/local/bin/perl#%{__perl}#'  $RPM_BUILD_ROOT%{ownlibdir}/cweb2html/cweb2html
117perl -pi -e 's#/usr/local/bin/perl#%{__perl}#'  $RPM_BUILD_ROOT%{ownlibdir}/makeseg/makeseg
118perl -pi -e 's#/usr/local/bin/perl#%{__perl}#'  $RPM_BUILD_ROOT%{ownlibdir}/makemap
119
120perl -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
123rm -f floatflt.ins latin9.def url.sty
124)
125
126(cd docs
127rm -f changebar.sty
128export TEXINPUTS=:.:../texinputs
129
130## article.cls don't provide \address.
131sed -i -e 's/\\author{\(.*\)}/\\author{\1/' -e 's!\\address{!\\\\hoge!' manual.tex
132# platex manual
133# platex manual
134# platex manual
135make clean
136make LATEX=platex manual.dvi
137dvipdfm manual.dvi)
138
139#### l2h wrapper install
140cp l2hconf_{gif,png}_{ja,en}.pm $RPM_BUILD_ROOT%{ownlibdir}
141install -c -m 0755 l2h-wrapper $RPM_BUILD_ROOT%{_bindir}/l2h
142
143## NO use perl(Win32), which is required by perl(L2hos::Win32)
144sed -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}
149exit 0
150
151
152%postun
153%{exec_texhash}
154exit 0
155
156
157%clean
158rm -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
Note: See TracBrowser for help on using the repository browser.