source: projects/specs/trunk/l/latex2html/latex2html-vl.spec @ 7779

Revision 7779, 5.1 KB checked in by munepi, 11 years ago (diff)

supported TeX Live 2013

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