fixed bz#1591144, buildroot issue
This commit is contained in:
parent
a79b64e492
commit
4d0e086c84
@ -3,7 +3,7 @@
|
||||
Summary: Converts LaTeX documents to HTML
|
||||
Name: latex2html
|
||||
Version: 2017.2
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/Publishing
|
||||
URL: http://www.latex2html.org/
|
||||
@ -86,15 +86,15 @@ tar fxz %{SOURCE2}
|
||||
--shlibdir=%{_datadir}/latex2html \
|
||||
--with-texpath=%{_datadir}/texmf/tex/latex/html
|
||||
|
||||
perl -pi -e"s,/usr/(share/)?lib,%{_datadir}," cfgcache.pm
|
||||
perl -pi -e "s,/usr/(share/)?lib,%{_datadir}," cfgcache.pm
|
||||
make
|
||||
popd
|
||||
|
||||
%if %{enable_japanese}
|
||||
pushd %{name}-%{version}JA
|
||||
sed s/latex2html/jlatex2html/g < %{SOURCE1} > cfgcache.pm
|
||||
perl -pi -e"s,/usr/bin/dvips,/usr/bin/pdvips," cfgcache.pm
|
||||
perl -pi -e"s,/usr/bin/latex,/usr/bin/platex," cfgcache.pm
|
||||
perl -pi -e "s,/usr/bin/dvips,/usr/bin/pdvips," cfgcache.pm
|
||||
perl -pi -e "s,/usr/bin/latex,/usr/bin/platex," cfgcache.pm
|
||||
|
||||
./configure --program-prefix=%{?_program_prefix} \
|
||||
--prefix=%{_prefix} \
|
||||
@ -113,10 +113,10 @@ perl -pi -e"s,/usr/bin/latex,/usr/bin/platex," cfgcache.pm
|
||||
--shlibdir=%{_datadir}/jlatex2html \
|
||||
--with-texpath=%{_datadir}/texmf/tex/latex/html
|
||||
|
||||
perl -pi -e"s,/usr/(share/)?lib,%{_datadir},;
|
||||
perl -pi -e "s,/usr/(share/)?lib,%{_datadir},;
|
||||
s,%{_datadir}/latex2html,%{_datadir}/jlatex2html," cfgcache.pm
|
||||
make
|
||||
perl -pi -e"s,\\\$\{dd}pstoimg,\\\$\{dd}jpstoimg, ;
|
||||
perl -pi -e "s,\\\$\{dd}pstoimg,\\\$\{dd}jpstoimg, ;
|
||||
s,\\\$\{dd}texexpand,\\\$\{dd}jtexexpand," l2hconf.pm
|
||||
|
||||
for i in latex2html pstoimg texexpand ; do
|
||||
@ -126,26 +126,29 @@ popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
# fix check-buildroot failure, bootroot is dropped manually
|
||||
%define __arch_install_post %{nil}
|
||||
pushd %{name}-%{version}
|
||||
perl -pi -e"s,%{_prefix},%{buildroot}%{_prefix}," cfgcache.pm
|
||||
perl -pi -e"s,/.*\\\$\{dd}texexpand,%{_bindir}/texexpand,;
|
||||
sed -i "s,%{_prefix},%{buildroot}%{_prefix}," cfgcache.pm
|
||||
sed -i "s,%{buildroot},," l2hconf.pm
|
||||
|
||||
perl -pi -e "s,/.*\\\$\{dd}texexpand,%{_bindir}/texexpand,;
|
||||
s,/.*\\\$\{dd}pstoimg,%{_bindir}/pstoimg,;
|
||||
s,/.*\\\$\{dd}*icons,\\\$\{LATEX2HTMLDIR}/icons,;
|
||||
s,/.*\\\$\{dd}rgb.txt,\\\$\{LATEX2HTMLDIR}/styles/rgb.txt,;
|
||||
s,/.*\\\$\{dd}styles\\\$\{dd}crayola.txt,\\\$\{LATEX2HTMLDIR}/styles/crayola.txt," latex2html
|
||||
perl -pi -e"s,%{buildroot},," l2hconf.pm
|
||||
|
||||
make install
|
||||
rm -f %{buildroot}%{_datadir}/latex2html/versions/table.pl.orig
|
||||
rm -rf %{buildroot}%{_datadir}/latex2html/docs/
|
||||
rm -rf %{buildroot}%{_datadir}/latex2html/example/
|
||||
perl -pi -e"s,%{buildroot},," %{buildroot}%{_datadir}/latex2html/cfgcache.pm
|
||||
perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/pstoimg
|
||||
perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/texexpand
|
||||
perl -pi -e"s,%{buildroot},," cfgcache.pm
|
||||
perl -pi -e"s,$cfg{'GS_LIB'} = q'';,$cfg{'GS_LIB'} = q'%{_datadir}/ghostscript/`ghostscript --version`';," cfgcache.pm
|
||||
rm -rf %{buildroot}%{_datadir}/latex2html/versions/table.pl.orig \
|
||||
%{buildroot}%{_datadir}/latex2html/docs/ \
|
||||
%{buildroot}%{_datadir}/latex2html/example/
|
||||
sed -i "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/latex2html/makeseg/makeseg
|
||||
sed -i "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/latex2html/makemap
|
||||
sed -i "s,###\!.*,," %{buildroot}%{_datadir}/latex2html/makemap
|
||||
sed -i "s,###\!.*,," %{buildroot}%{_datadir}/latex2html/makeseg/makeseg
|
||||
sed -i "s,%{buildroot},," %{buildroot}%{_bindir}/pstoimg
|
||||
sed -i "s,%{buildroot},," %{buildroot}%{_bindir}/texexpand
|
||||
sed -i "s,%{buildroot},," cfgcache.pm
|
||||
sed -i "s,$cfg{'srcdir'}.*,$cfg{'srcdir'} = q'%{name}-%{version}';," cfgcache.pm
|
||||
perl -pi -e "s,$cfg{'GS_LIB'} = q'';,$cfg{'GS_LIB'} = q'%{_datadir}/ghostscript/`ghostscript --version`';," cfgcache.pm
|
||||
install -m0644 *.pm %{buildroot}%{_datadir}/latex2html
|
||||
chmod +x %{buildroot}%{_datadir}/latex2html/makeseg/makeseg %{buildroot}%{_datadir}/latex2html/makemap
|
||||
|
||||
@ -154,38 +157,36 @@ mkdir -p %{buildroot}%{_mandir}/man1
|
||||
install -m0644 *.1 %{buildroot}%{_mandir}/man1
|
||||
popd
|
||||
|
||||
# install japanese version
|
||||
%if %{enable_japanese}
|
||||
pushd %{name}-%{version}JA
|
||||
perl -pi -e"s,%{_prefix},%{buildroot}%{_prefix}," cfgcache.pm
|
||||
perl -pi -e"s,latex2html pstoimg texexpand,jlatex2html jpstoimg jtexexpand," config/install.pl
|
||||
perl -pi -e"s,/.*\\\$\{dd}texexpand,%{_bindir}/jtexexpand,;
|
||||
sed -i "s,%{_prefix},%{buildroot}%{_prefix}," cfgcache.pm
|
||||
perl -pi -e "s,latex2html pstoimg texexpand,jlatex2html jpstoimg jtexexpand," config/install.pl
|
||||
perl -pi -e "s,/.*\\\$\{dd}texexpand,%{_bindir}/jtexexpand,;
|
||||
s,/.*\\\$\{dd}pstoimg,%{_bindir}/jpstoimg,;
|
||||
s,/.*\\\$\{dd}icons,\\\$\{LATEX2HTMLDIR}/icons,;
|
||||
s,/.*\\\$\{dd}styles\\\$\{dd}rgb.txt,\\\$\{LATEX2HTMLDIR}/styles/rgb.txt,;
|
||||
s,/.*\\\$\{dd}styles\\\$\{dd}crayola.txt,\\\$\{LATEX2HTMLDIR}/styles/crayola.txt," jlatex2html
|
||||
perl -pi -e"s,%{buildroot},," l2hconf.pm
|
||||
sed -i "s,%{buildroot},," l2hconf.pm
|
||||
|
||||
make install
|
||||
rm -f %{buildroot}%{_datadir}/jlatex2html/versions/table.pl.orig
|
||||
rm -rf %{buildroot}%{_datadir}/jlatex2html/docs/
|
||||
rm -rf %{buildroot}%{_datadir}/jlatex2html/example/
|
||||
perl -pi -e"s,%{buildroot},," %{buildroot}%{_datadir}/jlatex2html/cfgcache.pm
|
||||
perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/jpstoimg
|
||||
perl -pi -e"s,%{buildroot},," %{buildroot}%{_bindir}/jtexexpand
|
||||
perl -pi -e"s,%{buildroot},," cfgcache.pm
|
||||
perl -pi -e"s,$cfg{'GS_LIB'} = q'';,$cfg{'GS_LIB'} = q'%{_datadir}/ghostscript/`ghostscript --version`';," cfgcache.pm
|
||||
rm -rf %{buildroot}%{_datadir}/jlatex2html/versions/table.pl.orig \
|
||||
%{buildroot}%{_datadir}/jlatex2html/docs/ \
|
||||
%{buildroot}%{_datadir}/jlatex2html/example/
|
||||
sed -i "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/jlatex2html/makeseg/makeseg
|
||||
sed -i "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/jlatex2html/makemap
|
||||
sed -i "s,###\!.*,," %{buildroot}%{_datadir}/jlatex2html/makemap
|
||||
sed -i "s,###\!.*,," %{buildroot}%{_datadir}/jlatex2html/makeseg/makeseg
|
||||
sed -i "s,%{buildroot},," %{buildroot}%{_bindir}/jpstoimg
|
||||
sed -i "s,%{buildroot},," %{buildroot}%{_bindir}/jtexexpand
|
||||
sed -i "s,%{buildroot},," cfgcache.pm
|
||||
sed -i "s,$cfg{'srcdir'}.*,$cfg{'srcdir'} = q'%{name}-%{version}JA';," cfgcache.pm
|
||||
perl -pi -e "s,$cfg{'GS_LIB'} = q'';,$cfg{'GS_LIB'} = q'%{_datadir}/ghostscript/`ghostscript --version`';," cfgcache.pm
|
||||
install -m0644 *.pm %{buildroot}%{_datadir}/jlatex2html
|
||||
chmod +x %{buildroot}%{_datadir}/jlatex2html/makeseg/makeseg %{buildroot}%{_datadir}/jlatex2html/makemap
|
||||
popd
|
||||
%endif
|
||||
|
||||
for f in cweb2html/cweb2html makeseg/makeseg makemap ; do
|
||||
perl -pi -e "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/latex2html/$f
|
||||
%if %{enable_japanese}
|
||||
perl -pi -e "s,/usr/local/bin/perl,/usr/bin/perl," %{buildroot}%{_datadir}/jlatex2html/$f
|
||||
%endif
|
||||
done
|
||||
|
||||
# do not clash with texlive, prefer url.sty from texlive instead
|
||||
rm -f %{buildroot}%{_datadir}/texmf/tex/latex/html/url.sty
|
||||
|
||||
@ -218,6 +219,9 @@ rm -f %{buildroot}%{_datadir}/texmf/tex/latex/html/url.sty
|
||||
%{_mandir}/man1/pstoimg.*
|
||||
|
||||
%changelog
|
||||
* Thu Jun 14 2018 Than Ngo <than@redhat.com> - 2017.2-6
|
||||
- fixed bz#1591144, buildroot issue
|
||||
|
||||
* Fri May 11 2018 Than Ngo <than@redhat.com> - 2017.2-5
|
||||
- fixed FTBFS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user