source: projects/specs/trunk/l/latex2html2002/latex2html2002-vl.spec @ 5540

Revision 5540, 7.8 KB checked in by munepi, 12 years ago (diff)

updated latex2html2002-vl.spec

Line 
1%define pkgname         latex2html
2
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
9%define ownlibdir %{_prefix}/lib/%{pkgname}
10
11Summary: LaTeX to HTML converter.
12Summary(ja): LaTeX ファイルを HTML 形式に変換するツール
13Name: latex2html2002
14Version: %{ver}
15Release: 9%{?_dist_release}
16License: distributable
17Group: Applications/Publishing
18Url: http://www.latex2html.org/
19Source0: http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/latex2html-%{srcver}.tar.gz
20Source1: l2h-japanese.perl
21# vine patch
22Patch0: http://takeno.iee.niit.ac.jp/~shige/TeX/latex2html/data/l2h-%{srcver}+jp%{jpver}.patch.gz
23Patch1: l2h-vine.patch
24Patch2: latex2html.gs510.diff
25Patch3: l2h-netpbm-10.25.patch
26BuildArch: noarch
27%if %{?_dist_release} == "vl5"
28Requires: tetex
29%endif
30%if %{?_dist_release} >= "vl6"
31Requires: texlive-common
32%endif
33Requires: ghostscript >= 5.50
34Requires: perl
35Requires: netpbm-progs
36%if %{?_dist_release} == "vl5"
37BuildRequires: tetex
38%endif
39%if %{?_dist_release} >= "vl6"
40BuildRequires: texlive-common
41%endif
42BuildRequires: perl
43BuildRequires: netpbm-progs
44BuildRequires: netpbm >= 9.12
45
46Buildroot: %{_tmppath}/%{pkgname}-%{version}-root
47Vendor: Project Vine
48Distribution: Vine Linux
49Packager:     munepi
50
51%description
52Elaborate perl program to convert latex documents to html, using LaTeX
53to process images and equations. 
54
55%description -l ja
56Latex ファイルを HTML形式に変換するperlプログラムです.
57
58%prep
59%setup -q -n latex2html-%{srcver}
60%patch0 -p1
61%patch1 -p0
62%__cp -f %{SOURCE1} styles/japanese.perl
63cd config
64%patch2 -p0
65cd ..
66%patch3 -p1
67
68# fix perl path in a few places:
69%__sed -i -e "s|^#!/perl|#!%{__perl}|" l2hconf.pin || exit 1
70
71%build
72TMP=/var/tmp ./configure \
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}
86#./configure --prefix=%{_prefix} --sysconfdir=/etc --host=localhost\
87#       --enable-png --disable-gif --without-mktexlsr
88%__make
89
90##
91## make several l2hconf.pm and wrapper
92##
93%__sed -e 's/"jarticle"/"article"/' -e 's/japanese/english/' \
94    -e 's/UNUSEACCENT = 1/UNUSEACCENT = 0/' \
95    -e 's/texexpand/texexpand-en/' \
96    l2hconf.pm > l2hconf_en.pm
97%__sed -e 's/#$TOHTML/$TOHTML = "|nkf -j";/' \
98    -e 's/#$charset/$charset = "iso-2022-jp";/' \
99    l2hconf.pm > l2hconf_jis.pm
100%__sed -e 's/#$TOHTML/$TOHTML = "|nkf -s";/' \
101    -e 's/#$charset/$charset = "Shift_JIS";/' \
102    l2hconf.pm > l2hconf_sjis.pm
103%__sed -e 's/#$TOHTML/$TOHTML = "|nkf -e";/' \
104    -e 's/#$charset/$charset = "EUC-JP";/' \
105    l2hconf.pm > l2hconf_euc.pm
106%__sed -e 's/#$TOHTML/$TOHTML = "|nkf -w";/' \
107    -e 's/#$charset/$charset = "UTF-8";/' \
108    l2hconf.pm > l2hconf_utf8.pm
109%__cp l2hconf.pm l2hconf_png_ja.pm
110%__sed -e 's/"jarticle"/"article"/' -e 's/japanese/english/' \
111    l2hconf.pm > l2hconf_png_en.pm
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
116
117
118%install
119%__rm -rf $RPM_BUILD_ROOT
120
121# fake root directory
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
127
128(cd %{buildroot}
129%__perl -pi -e 's@iso-8859-1@euc-jp@g' %{_bindir}/latex2html || exit 1
130for i in `grep -ir -l %{buildroot} *`;
131do
132    %__perl -pi -e "s@%{buildroot}@@g" $i || exit 1
133    %__chmod 755 $i
134done
135for i in `grep -ir -l %{_builddir} *`;
136do
137    %__perl -pi -e "s@%{_builddir}@@g" $i || exit 1
138    %__chmod 755 $i
139done
140)
141
142# fix perl path in a few places:
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
146
147%__perl -pi -e "s#$RPM_BUILD_DIR/%{pkgname}-%{version}#%{ownlibdir}#" $RPM_BUILD_ROOT%{ownlibdir}/cfgcache.pm || exit 1
148
149(cd $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html
150%__rm -f floatflt.ins latin9.def url.sty
151)
152
153(cd docs
154    # ## changebar.sty: provided by texlive-collection-latexextra
155    # %__rm -f changebar.sty
156    export TEXINPUTS=:.:../texinputs
157
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)
164
165#### l2h wrapper install
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
168
169## NO use perl(Win32), which is required by perl(L2hos::Win32)
170%__rm -f $RPM_BUILD_ROOT%{ownlibdir}/L2hos/Win32.pm
171
172%post
173%{exec_texhash}
174exit 0
175
176
177%postun
178%{exec_texhash}
179exit 0
180
181
182%clean
183%__rm -rf $RPM_BUILD_ROOT
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}/*
191%{ownlibdir}
192%{_datadir}/texmf/tex/latex/html/
193
194%changelog
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
207* Sun Mar 29 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 2002-7
208- comment out "use Win32;" in %%{ownlibdir}/L2hos/Win32.pm
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
Note: See TracBrowser for help on using the repository browser.