source: projects/specs/branches/6/l/latex2html/latex2html-vl.spec @ 5541

Revision 5541, 5.8 KB checked in by munepi, 12 years ago (diff)

updated latex2html{,2002}-vl.spec

Line 
1%define jppatchsrcver   jp20110708
2%define jppatch         l2h-2K8-jp2.1b1.13.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:        2%{?_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-common
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-common
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
58Packager:       munepi
59
60%description
61LATEX2HTML is a conversion tool that allows documents written in LATEX to
62become part of the World-Wide Web. In addition, it offers an easy migration
63path towards authoring complex hyper-media documents using familiar
64word-processing concepts, including the power of a LATEX-like macro language
65capable of producing correctly structured HTML tags.
66
67LATEX2HTML replicates the basic structure of a LATEX document as a set of
68interconnected HTML files which can be explored using automatically generated
69navigation panels. The cross-references, citations, footnotes, the
70table-of-contents and the lists of figures and tables, are also translated
71into hypertext links. Formatting information which has equivalent “tags” in
72HTML (lists, quotes, paragraph-breaks, type-styles, etc.) is also converted
73appropriately. The remaining heavily formatted items such as mathematical
74equations, pictures etc. are converted to images which are placed
75automatically at the correct position in the final HTML document.
76
77LATEX2HTML extends LATEX by supporting arbitrary hypertext links and symbolic
78cross-references between evolving remote documents. It also allows the
79specification of conditional text and the inclusion of raw HTML commands.
80These hyper-media extensions to LATEX are available as new commands and
81environments from within a LATEX document.
82
83
84%prep
85%setup -q
86%__tar zxvf %{SOURCE1} -C $RPM_BUILD_DIR || exit 1
87%__patch -p1 < %{jppatch}
88
89%patch0 -p0 -b .vine
90
91# fix perl path in a few places:
92%__sed -i -e "s|^#!/perl|#!%{__perl}|" l2hconf.pin || exit 1
93
94%build
95./configure \
96    --prefix=%{_prefix} \
97    --libdir=%{ownlibdir} \
98    --shlibdir=%{ownlibdir} \
99    \
100    --with-perl=%{__perl} \
101    --enable-images \
102    --disable-pk \
103    --enable-eps \
104    --enable-png \
105    --enable-gif \
106    --with-gs=%{_bindir}/gs \
107%if %{?_dist_release} == "vl6"
108    --with-dvips=%{_bindir}/pdvips \
109%endif
110    --with-latex=%{_bindir}/platex \
111    --without-mktexlsr \
112    --with-kanji=utf8 \
113        ;
114%__make
115
116
117%install
118%__rm -rf $RPM_BUILD_ROOT
119
120## fake root directory
121%__sed -e 's|/usr|'"${RPM_BUILD_ROOT}"'/usr|' \
122        -e 's|bin/latex|bin/platex|' cfgcache.pm > cfgcache.pm.new || exit 1
123%__mv cfgcache.pm.new cfgcache.pm || exit 1
124
125%__make install
126
127(cd %{buildroot}
128    for i in `grep -ir -l %{buildroot} *`; do
129        %__perl -pi -e "s@%{buildroot}@@g" $i || exit 1
130        %__chmod 755 $i
131    done
132    for i in `grep -ir -l %{_builddir} *`;
133    do
134        %__perl -pi -e "s@%{_builddir}@@g" $i || exit 1
135        %__chmod 755 $i
136    done
137)
138
139## fix perl path in a few places:
140%__perl -pi -e "s#$RPM_BUILD_DIR/%{pkgname}-%{version}#%{ownlibdir}#" $RPM_BUILD_ROOT%{ownlibdir}/cfgcache.pm || exit 1
141
142## latin9.def url.sty: provided by texlive-collection-latex package
143(cd $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html
144    %__rm -f floatflt.ins latin9.def url.sty
145)
146
147(cd docs
148    # ## changebar.sty: provided by texlive-collection-latexextra
149    # %__rm -f changebar.sty
150    export TEXINPUTS=:.:../texinputs
151
152    ## article.cls don't provide \address.
153    %__sed -i -e 's/\\author{\(.*\)}/\\author{\1/' -e 's!\\address{!\\\\hoge!' manual.tex || exit 1
154    %__make clean
155    %__make LATEX=platex manual.dvi
156    %{_bindir}/dvipdfm manual.dvi || exit 1
157)
158
159## NO use perl(Win32), which is required by perl(L2hos::Win32)
160%__rm -f $RPM_BUILD_ROOT%{ownlibdir}/L2hos/Win32.pm
161
162
163%post
164%{exec_texhash}
165exit 0
166
167
168%postun
169%{exec_texhash}
170exit 0
171
172
173%clean
174%__rm -rf $RPM_BUILD_ROOT
175
176%files
177%defattr(-,root,root)
178%doc BUGS Changes FAQ INSTALL LICENSE MANIFEST README TODO
179%doc README.notice.jp README.patch-99.1jp README.patch-jp-pre README.tech.jp
180%doc docs/ example/ tests/
181%doc dot.latex2html-init
182%{_bindir}/*
183%{ownlibdir}
184%{_datadir}/texmf/tex/latex/html/
185
186%changelog
187* Sat Jan 28 2012 Munehiro Yamamoto <munepi@vinelinux.org> 2008-2
188- l2h-2K8-jp20110708
189- Requires, BuildRequires: s/texlive/texlive-common/ (for vl6 or higher)
190
191* Sun Sep 26 2010 Munehiro Yamamoto <munepi@vinelinux.org> 2008-1
192- first release
Note: See TracBrowser for help on using the repository browser.