File htmldoc.spec of Package htmldoc.17472

#
# spec file for package htmldoc
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


Name:           htmldoc
Version:        1.9.12
Release:        0
Summary:        HTML Processor that Generates HTML, PostScript, and PDF Files
License:        LGPL-2.1-or-later
Group:          Productivity/Publishing/HTML/Tools
URL:            https://michaelrsweet.github.io/htmldoc/index.html
Source:         https://github.com/michaelrsweet/htmldoc/releases/download/v%{version}/htmldoc-%{version}-source.tar.gz
# PATCH-FIX-UPSTREAM CVE-2021-40985 [bsc#1192357], buffer overflow may lead to DoS via a crafted BMP image
Patch0:          htmldoc-CVE-2021-40985.patch
# PATCH-FIX-UPSTREAM CVE-2021-43579 [bsc#1194487], stack-based buffer overflow in image_load_bmp() results in remote code execution if the victim converts an HTML document linking to a crafted BMP file
Patch1:          htmldoc-CVE-2021-43579.patch
# PATCH-FIX-UPSTREAM CVE-2022-0534 [bsc#1195758], stack out-of-bounds read in gif_get_code() when opening a malicious GIF file results in a segmentation fault
Patch2:          htmldoc-CVE-2022-0534.patch
# PATCH-FIX-UPSTREAM CVE-2022-24191 [bsc#1198204], infinite loop in the gif_read_lzw function can lead to a buffer overflow
Patch3:          htmldoc-CVE-2022-24191.patch
# CVE-2022-28085 [bsc#1198933], Heap buffer overflow in function pdf_write_names in ps-pdf.cxx
Patch4:          htmldoc-CVE-2022-28085.patch
BuildRequires:  fltk-devel
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  libXpm-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libgnutls-devel
BuildRequires:  libjpeg-devel
BuildRequires:  libpng-devel
BuildRequires:  update-desktop-files
BuildRequires:  zlib-devel

%description
HTMLDOC converts HTML source files into indexed HTML, PostScript, or
Portable Document Format (PDF) files that can be viewed online or printed.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%build
%configure \
  --with-gui
%make_build

%install
%make_install
# Workaround faulty installation
mv -f %{buildroot}%{buildroot}/* \
  %{buildroot}
# Get rid of unvanted files
rm -rf %{buildroot}/home %{buildroot}%{_datadir}/doc/%{name}
# Update desktop file
%suse_update_desktop_file -r %{name} Development Documentation
%suse_update_desktop_file %{name} -G%{name}

%files
%license COPYING
%doc CHANGES.md README.md
%{_bindir}/htmldoc
%{_datadir}/htmldoc
%{_datadir}/pixmaps/htmldoc.xpm
%{_datadir}/icons/hicolor/*x*/apps/htmldoc.png
%{_datadir}/mime/packages/htmldoc.xml
%{_datadir}/applications/htmldoc.desktop
%{_mandir}/man1/htmldoc.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by