File latex2html.spec of Package latex2html

# spec file for package latex2html
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define share_dir %{_datadir}/latex2html
Name:           latex2html
Version:        2017.2
Release:        0
Summary:        LaTeX to HTML Converter
License:        GPL-2.0+
Group:          Productivity/Publishing/TeX/Utilities
Source1:        latex2html-manual.tar.bz2
Source2:        latex2html-README.SUSE
Source3:        testfile.tex
Source5:        latex2html.1
Patch0:         latex2html-share-dir.diff
Patch1:         latex2html-perl-bindir.diff
Patch2:         latex2html-dest-dir.diff
Patch3:         latex2html-binmode.diff
Patch4:         latex2html-backref-workaround.diff
Patch5:         latex2html-perl526.patch
BuildRequires:  fdupes
BuildRequires:  ghostscript-fonts-std
BuildRequires:  ghostscript-x11
BuildRequires:  netpbm
BuildRequires:  texlive-dvips
BuildRequires:  texlive-kpathsea
BuildRequires:  texlive-latex
Requires:       ghostscript_any
Requires:       latex2html-pngicons
Requires:       netpbm
Requires:       perl
Requires:       texlive-dvips
Requires:       texlive-latex
BuildArch:      noarch
%{expand: %%global _texmfmaindir %(kpsewhich -expand-var='$TEXMFMAIN')}

LaTeX2HTML lets you convert basic LaTeX documents into the HTML
format. This allows both a written and online version even of older
LaTeX texts.

%package pngicons
Summary:        Icons in the PNG format for LateX2HTML
License:        GPL-2.0+
Group:          Productivity/Publishing/TeX/Utilities

%description pngicons
Icons in the PNG format for the LaTeX to HTML Converter.

%package doc
Summary:        Documentation for the Latex2HTML Converter
License:        GPL-2.0+ AND LPPL-1.3c
Group:          Productivity/Publishing/TeX/Utilities

%description doc
This subpackage contains the documentation for the Latex2HTML converter.

%setup -q -a 1
%patch5 -p1
cp %{SOURCE4} .

# Not autotools based configure
./configure --prefix=%{_prefix}
make %{?_smp_mflags}

mkdir -p %{buildroot}/%{_mandir}/man1
install -m 644 %{SOURCE5} %{buildroot}/%{_mandir}/man1
rm -r %{buildroot}%{share_dir}/{docs,example,dot.latex2html-init,readme.hthtml}
chmod 755 %{buildroot}%{_datadir}/%{name}/{cweb2html/,cweb2html/cweb2html,makemap,makeseg/makeseg}
%fdupes -s %{buildroot}

LATEX2HTMLDIR=%{buildroot}/%{share_dir} ./latex2html --test_mode %{SOURCE3}

%doc README.SUSE Changes FAQ TODO dot.latex2html-init readme.hthtml
%dir %{share_dir}

%files pngicons
%dir %{share_dir}
%dir %{share_dir}/icons

%files doc
%doc manual
%doc tests
%doc example

openSUSE Build Service is sponsored by