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

Revision 1924, 5.6 KB checked in by munepi, 14 years ago (diff)

update latex2html

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