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

Revision 12280, 5.5 KB checked in by ara_t, 5 years ago (diff)

latex2html: update to 2018.2

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