Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 18e4bffbd85345f66a709928c1c8553e > files > 10

latex2html-2002-12mdk.src.rpm

%define name	latex2html
%define version	2002
%define release 12mdk
%define compactversion	2002-2-1

Name: 		%{name}
Summary: 	LaTeX to HTML converter
Version: 	%{version}
Release: 	%{release}
License: 	GPL
Group: 		Publishing
URL: 		http://www.latex2html.org
Source: 	http://saftsack.fs.uni-bayreuth.de/~latex2ht/current/%{name}-%{compactversion}.tar.bz2
Patch0:		%{name}-%{version}-gsfonts.patch.bz2
Patch1:		%{name}-%{compactversion}-path.patch.bz2
Patch2:		%{name}-perlversion.patch.bz2
Patch3:		%{name}-doc-address.patch.bz2
Patch4:		%{name}-pdfoutput.patch.bz2
Patch5:		%{name}-gs-stderr.patch.bz2
Patch6:		%{name}-perlcall.patch.bz2
Patch7:		%{name}-htmladdimg.patch.bz2
Requires:	ghostscript >= 6.50
Requires:	giftrans
Requires:	netpbm
Requires:	perl >= 5.004
Requires: 	tetex-latex >= 1.0.7
Requires:	tetex-dvips >= 1.0.7
BuildRequires:	tetex-dvips
BuildRequires:	tetex-latex ghostscript
BuildRoot:	%{_tmppath}/ltx-%{version}-root
BuildArchitectures:	noarch
%define _requires_exceptions Win32

%define graphic_format	png	# use "gif" or "png"
%define latex2htmldir %{_prefix}/lib/%{name}

%description
Elaborate perl program to convert latex documents to html, using LaTeX
to process images and equations.  

%prep
%setup -q -n %{name}-%{compactversion}
%patch0 -p1 -b .gsfonts
%patch1 -p1
%patch2 -p1 -b .perl
%patch3 -p1 -b .address
%patch4 -p1
%patch5 -p1 -b .stderr
%patch6 -p1 
%patch7 -p1

%build
TMP=/var/tmp ./configure \
	--with-gs=%{_bindir}/gs \
	--with-texpath=%{_datadir}/texmf/tex/ \
	--without-mktexlsr \
	--with-perl=%{__perl} \
	--prefix=%{_prefix} \
	--shlibdir=%{latex2htmldir} \
	--with-initex="%{_bindir}/tex -ini" \
	--with-rgb=/usr/X11R6/lib/X11/rgb.txt
%make

%install
rm -rf $RPM_BUILD_ROOT
# custom "make install" so paths are proper in the perl programs

mkdir -p $RPM_BUILD_ROOT%{_bindir} \
	$RPM_BUILD_ROOT%{latex2htmldir}

install -m 755 latex2html $RPM_BUILD_ROOT%{_bindir}
install -m 755 pstoimg $RPM_BUILD_ROOT%{_bindir}
install -m 755 texexpand $RPM_BUILD_ROOT%{_bindir}

cp -avRf IndicTeX-HTML $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf L2hos.pm $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf L2hos $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf XyMTeX-HTML $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf cweb2html $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf docs $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf example $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf foilhtml $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf icons $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf makeseg $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf styles $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf texinputs $RPM_BUILD_ROOT%{latex2htmldir}/
cp -avRf versions $RPM_BUILD_ROOT%{latex2htmldir}/

cp -avRf cfgcache.pm dot.latex2html-init l2hconf.pm makemap readme.hthtml \
	$RPM_BUILD_ROOT%{latex2htmldir}/

mkdir -p $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html
cp -avRf texinputs/* $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html

mkdir -p $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}
cp -avRf Changes FAQ MANIFEST README readme.hthtml TODO BUGS INSTALL \
	dot.latex2html-init example \
		$RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version}

# fix perl path in a few places:
perl -pi -e 's#/usr/local/bin/perl#%{__perl}#' $RPM_BUILD_ROOT%{_prefix}/lib/latex2html/cweb2html/cweb2html
perl -pi -e 's#/usr/local/bin/perl#%{__perl}#' $RPM_BUILD_ROOT%{_prefix}/lib/latex2html/makeseg/makeseg
perl -pi -e 's#/usr/local/bin/perl#%{__perl}#' $RPM_BUILD_ROOT%{latex2htmldir}/makemap

# fix some installation path
perl -pi -e "s#$RPM_BUILD_DIR/%{name}-%{compactversion}#%{latex2htmldir}#" \
	$RPM_BUILD_ROOT%{latex2htmldir}/cfgcache.pm
perl -pi -e "s#%{_datadir}/lib/latex2html#%{latex2htmldir}#" \
	$RPM_BUILD_ROOT%{latex2htmldir}/cfgcache.pm

# these files are already included in tetex
(cd $RPM_BUILD_ROOT%{_datadir}/texmf/tex/latex/html
rm -f floatflt.ins latin9.def url.sty
)

(cd docs 
rm -f changebar.sty url.sty
TEXINPUTS=.:../texinputs:
export TEXINPUTS
latex manual
latex manual
latex manual
dvipdf manual.dvi
install -m 644 manual.pdf $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}-%{version})

%clean
rm -rf $RPM_BUILD_ROOT

%post
[ -x /usr/bin/texhash ] && /usr/bin/env - /usr/bin/texhash 2> /dev/null
exit 0

%postun
[ -x /usr/bin/texhash ] && /usr/bin/env - /usr/bin/texhash 2> /dev/null
exit 0

%files
%defattr(-,root,root,0755)
%{_bindir}/*
%dir %{latex2htmldir}
%{latex2htmldir}/*
%{_datadir}/texmf/tex/latex/html/
%{_docdir}/%{name}-%{version}

%changelog
* Sat Mar 19 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-12mdk
- Added Patch7, for html.sty from latex2html author.

* Sat Mar 12 2005 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-11mdk
- latex2html-2002-2-1 (25-Oct-2004).
- removed \\address{...} usage in documentation (Patch3).
- Let latex/pdflatex checking in html.sty more robust (Patch4).
- Added Patch5 because 'gs -h' outputs to stderr.

* Fri Aug 27 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-10mdk
- Rebuilt.

* Fri Nov 21 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-9mdk
- Added Thierry Vignaud's patch for avoiding versioned perl calls.

* Wed Nov 19 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-8mdk
- Rebuilt against latest perl.

* Fri Sep 19 2003 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 2002-7mdk
- always use %{_prefix}/lib/latex2html dir, this is a noarch package

* Fri Aug 22 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2002-6mdk
- don't dumbly depend on perl-Win32 (people should test their
  package uploads!!)

* Fri Aug 15 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-5mdk
- Release: 2002-2-1 of 23/5/2003.

* Fri Jul 25 2003 Per Øyvind Karlsen <peroyvind@sintrax.net> 2002-4mdk
- rebuild.
- rm -rf $RPM_BUILD_ROOT at the beginning of %%install.

* Tue Feb 18 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-3mdk
- compactversion to 2002-2-1.

* Tue Aug 06 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-2mdk
- release 2002-1.
- fixed path problem reported by Oliver Lemke.
- added Patch1.

* Fri Apr 12 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2002-1mdk
- release 2002.
- added %patch0 for $gs_fonts path.

* Tue Mar 05 2002 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2000.1beta-5mdk
- latex2html.pim 1.50 -> 1.62.
- updated URL.
- sync %%post/%%postun scripts with tetex.
- removed pablo utf8 patches (merged into tree).
- exchanged PS <-> PDF documentation (shorter).
- removed duplicated styles (floatflt.ins, url.sty, latin9.def).

* Thu Aug 09 2001 Pablo Saratxaga <pablo@mandrakesoft.com> 2000.1beta-4mdk
- corrected wrong charset indication when creating utf-8 pages

* Tue Jul 31 2001 Yves Duret <yduret@mandrakesoft.com>  2000.1beta-3mdk
- use %%__perl macros, use perl (sed sux)
- rebuild with netpbm
- added requires to netpbm

* Tue Jun  5 2001 Matthias Badaire <mbadaire@mandrakesoft.com> 2000.1beta-2mdk
- fix pstoimg tmp variable issue 

* Tue May 15 2001 Matthias Badaire <mbadaire@mandrakesoft.com> 2000.1beta-1mdk
- update to 2K.1beta

* Mon Jan 22 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 99.2beta8-4mdk
- include manual.ps following suggestion by David Aspinall <da@dcs.ed.ac.uk>

* Tue Nov  7 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 99.2beta8-3mdk
- fix specfile

* Fri Aug 25 2000 Geoffrey Lee <snailtalk@mandrakesof.com> 99.2beta8-2mdk
- readd /usr/bin/pstoimg ...oops ... (Erik Devriendt)
- fix license. There is no such thing as a GNU license.!

* Wed Aug 02 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 99.2beta8-1mdk
- new version to fix some nasty bugz (Meinhard E. Mayer)

* Sun Jul 30 2000 Geoffrey Lee <snailtalk@mandrakesoft.com> 99.2beta6-4mdk
- rebuild with cleanup

* Mon Mar 20 2000 Camille Begnis <camille@mandrakesoft.com> 99.2beta6-3mdk
- Fixed group

* Sat Mar 18 2000 Camille Begnis <camille@mandrakesoft.com> 99.2beta6-2mdk
- minor spec update 

* Thu Feb 10 2000 Lenny Cartier <lenny@mandrakesoft.com>
- new in contribs
- used - once again - a great srpm provided by Vincent Danen <vdanen@linux-mandrake.com>

* Tue Feb 8 2000 Vincent Danen <vdanen@linux-mandrake.com>
- added fixes for some perl scripts that point to /usr/local/bin/perl

* Sun Feb 6 2000 Vincent Danen <vdanen@linux-mandrake.com>
- initial specfile
- bzip sources
- removed make install and replaced with custom installer to ensure correct
  paths in the latex2html perl programs