File chm2pdf.spec of Package chm2pdf
#
# spec file for package chm2pdf
#
# Copyright (c) 2022 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: chm2pdf
Version: 0.9.1
Release: 0
Summary: Convert CHM Files to PDF Ones
License: GPL-2.0-only
Group: Productivity/Publishing/PDF
URL: https://code.google.com/archive/p/chm2pdf/
Source0: https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/chm2pdf/%{name}-%{version}.tar.gz
Source1: chm2pdf.1
# PATCH-FIX-UPSTREAM chm2pdf-0.9.1-insecure_temp_dirs.patch -- don't use static names to create temp dirs
Patch0: chm2pdf-0.9.1-insecure_temp_dirs.patch
# PATCH-FIX-UPSTREAM chm2pdf-0.9.1-bashisms.patch -- fix bashisms in chm2pdf
Patch1: chm2pdf-0.9.1-bashisms.patch
Patch2: chm2pdf-python3.patch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
# some projects do not offer python3-pychm (e.g. Leap 15.3), catch this early on:
BuildRequires: python3-pychm
Requires: python3
Requires: chmlib
Requires: chmlib-examples
Requires: htmldoc
Requires: python3-pychm
Recommends: python3-beautifulsoup
BuildArch: noarch
%description
This simple script converts files from CHM format to PDF.
%prep
%autosetup
%build
%install
python3 setup.py install \
--root=%{buildroot} \
--prefix=%{_prefix}
install -Dm 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/%{name}.1
%files
%license LICENSE
%doc README
%{_bindir}/%{name}
%{_mandir}/man?/*
%{python3_sitelib}/%{name}-*.egg-info
%changelog